FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
#Kata ScrabbleSets
##Description
Scrabble is a popular word game where players remove tiles with letters on them from a bag and use them to create words on a board. The total number of tiles, as well as the frequency of each letter, does not change between games.
We'll use the tile set from the English edition, which has 100 tiles total. Here's a reference for the distribution and point value of each tile.
Each tile will be represented by the letter that appears on it, with the exception that blank tiles are represented by underscores _.
#!/bin/sh | |
command="${*}" | |
printf "Initialized REPL for `%s`\n" "$command" | |
printf "%s> " "$command" | |
read -r input | |
while [ "$input" != "" ]; | |
do | |
eval "$command $input" | |
printf "%s> " "$command" |
Change Apple OS X Dock size from Apple Terminal
defaults write com.apple.dock tilesize -int 32; killall Dock
32
is icon size
If you have any sort of administrative interface on your web site, you can easily imagine an intruder gaining access and mucking about. How do you know the extent of the damage? Adding an audit log to your app is one quick solution. An audit log should record a few things:
- controller entry points with parameter values
- permanent information about the user, like user_id
- transient information about the user, like IP and user_agent
Using the Rails framework, this is as simple as adding a before_action
to your admin controllers. Here’s a basic version that I’m using in production.
These are the Kickstarter Engineering and Data role definitions for both teams.
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository
sudo yum update # update yum
sudo yum install centos-release-scl # install SCL
sudo yum install python27 # install Python 2.7
To use it, you essentially spawn another shell (or script) while enabling the newer version of Python: