The Design Of Everyday Things
Get Corsair Esperanza EG106 gamepad working on Linux
Device is recognized as Bus 001 Device 018: ID 045e:028e Microsoft Corp. Xbox360 Controller
but no inputs are registered.
It seems that the generic gamepad driver doesn't properly initialize the device, so this script sends the proper initialization commands to the joystick:
#!/usr/bin/env python3
import os
import sys
try:
import usb.core
import usb.util
except ImportError:
print("First, install the pyusb module with PIP or your package manager.")
else:
if os.geteuid() != 0:
print("You need to run this script with sudo")
sys.exit()
dev = usb.core.find(find_all=True)
for d in dev:
if d.idVendor == 0x045e and d.idProduct == 0x028e:
d.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)
finally:
sys.exit()
Source:
A gallery of typographic and graphics design examples of rubrication, a classic pattern of using red versus black for emphasis.
Calendar proposal Symmetry454
Brilliant! Read a book one page per day using your email inbox.
Battlestar Galactica (start with miniseries)
Farscape
The Orville
MySQL query to CSV
mysql dbname -uuser -ppassword -h "host" -e 'query' | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > file.csv
44. Eric Peters // Coffee Commissary // Los Angeles
Flavor notes
“Syrupy, Jammy, Heavy Body, Espresso-like”
Suggested Coffee
“A natural processed Colombian Coffee”
Recipe
Brew Style: Inverted
Coffee: 22 grams
Grind Size: Setting 2 on Handground
Water: 100 grams at 190F
Water-to-Coffee Ratio: 5:1
Brew Time: 1:30
Method
50g bloom for 50 seconds
Agitate the grounds using a bar spoon
10 second pour to 100g
10 second rest
20 second plunge
https://handground.com/grind/66-recipes-for-amazing-aeropress-coffee
43. Brandon // Handground
Flavor notes
“Brings out the juiciest flavors in the coffee. Thick, full-bodied, espresso-like”
Suggested Coffee
“Natural processed Colombian coffees”
Recipe
Brew Style: Inverted
Coffee: 30 grams
Grind Size: Setting 5.5 on Handground
Water: 120 grams at 184F
Water-to-Coffee Ratio: 4:1
Brew Time: 1:10
Method
Pour 120g of water, stir for 10 seconds
Immediately put cap on and flip on top of cup
Pull plunger slightly to stop coffee from dripping (creates vacuum)
Wait 40 seconds, press for 20 seconds.
https://www.sketchcase.com - turn your laptop lid into a portable whiteboard
Let's say you start an e-commerce site.
Your first engineer is Picasso during his blue period. Your codebase quickly becomes filled with Picasso blue period javascript files. He paints you a javascript shopping cart without a problem. He's done it a million times before. But this is his best one. It's his masterpiece. And very blue.
Your second engineer is Salvador Dali. He shows up on his first day with a camera, a single paintbrush, a silly mustache, and starts contributing some crazy surrealist javascript files.
This influences Picasso as they work together and Picasso starts switching things up and begins adding cubism files to the codebase. The codebase is so new that Picasso and Dali can continue adding new files at any time with no harm, because there is no maintenance when it's just two engineers adding new functionality. No one is stepping on each other's toes. There's enough paint for everyone.
Then you hire Monet and he comes in and leaves his impression on everything.
Now you have a blue period shopping cart, impressionist image lazy loading, surrealist photo slide show, and cubism style event tracking in /app/assets/javascripts. The javascripts folder becomes a museum.
Let's jump to the future 4 years later. Lots of major functionality has already been built. Picasso has left the company to pursue a company built on a guernica style. Your business focus has shifted a bit and you need someone to extend Picasso's blue period shopping cart to support collaborative shopping (lots of people sharing the same cart in realtime).
Luckily you just hired a rising star in javascript land that likes to spray paint things on the wall, his name is Banksy. So you tell Banksy, "Hey for your first job we need you to modify our shopping cart so it supports collaboration. Timing is really important for the big relaunch, fortunately this should be really easy because we already have Picasso's shopping cart and it's already a masterpiece. Just reuse that."
So Banksy goes in and spray paints over your Picasso shopping cart and makes it collaborative and you have a big successful relaunch.
A month later a bug report comes in about removing items from the shopping cart. Banksy is busy on another project, so you get Monet to go in and fix it.
Monet doesn't know how to use spray paint cans. So his attempts to fix it are sloppy. He breaks the build. He switches back to the brush and just paints over it, but it took a lot longer than it should have because of the time to understand and adopt an unfamiliar style.
When you have over 80 engineers contributing to one codebase, you quickly learn your usual ways of doing things don't work. So we try to turn everyone into Picasso. No matter where you jump in to the codebase, all the files are familiar and look like they were painted by you.
The most important thing, no matter what your preferred javascript style is, is to be consistent when working with a team or a large codebase that will have to be maintained in the future.
The style that works best for our team is our Picasso style since that's how it all started.
We open sourced our style guide so other teams could fork it and turn it into a Monet style guide or a Banksy style guide. Which is lots of fun to watch.
As an individual painter/engineer working on side projects and exploring all the wonderful things you can do with javascript, please throw conventions away and ignore everything anyone has ever said.
It's the only way the world will enjoy the next Picasso.
"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects."
-- Robert Heinlein
Added AI players to my simple multiplayer game, check it out at http://pixelwars.hajdarevic.net
Go is an engineering tool, in a much broader sense. To appreciate it properly I think you have to have spent a decent amount of time responsible for the full lifecycle. If all you ever do is write and commit code then much of Go will be lost on you.
I've built a simple multiplayer game with socket.io, crafty.js & node.js. Check it out
IDE script for JetBrains IDEs that enables you to start multiple configurations in debug mode at once.
Go to Tools->IDE Scripting Console, select Groovy as language of choice and paste the code provided. You have to select all lines and press CTRL+ENTER to run the script.
Some people won't have IDE scripting option visible in the menus so you'll have to create manual keystroke binding to open it. Just make sure that you replace configuration names with your own :-)
multiRun = [
"IRB console: [local] document_storage_service",
"IRB console: [local] metadata_service",
"IRB console: [local] table_storage_service",
];
allSettings = com.intellij.execution.RunManager.getInstance(com.intellij.openapi.project.ProjectManager.getInstance().getOpenProjects()[0]).getAllSettings();
executor = com.intellij.execution.ExecutorRegistry.getInstance().getExecutorById(com.intellij.openapi.wm.ToolWindowId.DEBUG);
toBeRun = allSettings.findAll { setting ->
multiRun.any { setting.toString() == it }
}.each {
com.intellij.execution.runners.ExecutionUtil.runConfiguration(it, executor);
}
Great concept! sshd port using TOTP
Push button power switch with the ability of microcontroller to turn itself off.
So you want to validate an email field that conforms to the RFC822? Here's a "simple" regex for that ;-)
If your Nokia Lumia 920 suddenly starts opening camera app, and the battery starts to drain real quick (i.e. it can't last for more than four-five hours in idle mode) it's the Side Volume Power Camera Switch Button Flex Cable which has malfunctioned. Try replacing it first before buying a new battery... It could save you ~30$
FlexboxPatterns.com - cool resource for some common web page elements done using flexbox.
Color Brewer 2 is a really good resource for selecting map color palettes. Their published paper goes a little bit more in detail on why selecting effective color schemes for thematic maps is surprisingly difficult.
Everybody is writing their own databases nowadays.
I have never seen more poetic and in depth comparison of cheaper items.
Cloud design patterns - Microsoft Developer Network
transfer.sh - easy file sharing from the command line
Good post (or perhaps an essay?) on How to Deploy Software