Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/usr/bin/env ruby | |
# coding: utf-8 | |
require 'digest/md5' | |
require 'net/http' | |
class LastFM | |
attr_reader :api_key, :secret, :session_key, :base_uri, :namespace |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
Installing rb-fsevent (0.4.3.1) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/usr/local/Cellar/ruby/1.9.2-p290/bin/ruby extconf.rb | |
creating Makefile | |
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -Os -pipe -Wmissing-prototypes -Wreturn-type -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wunused-parameter -Wunused-variable -Wunused-value -Wuninitialized -Wunknown-pragmas -Wshadow -Wfour-char-constants -Wsign-compare -Wnewline-eof -Wconversion -Wshorten-64-to-32 -Wglobal-constructors -pedantic' /usr/bin/clang -isysroot /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -mdynamic-no-pic -std=gnu99 -dead_strip -framework CoreServices -o '/usr/local/lib/ruby/gems/1.9.1/gems/rb-fsevent-0.4.3.1/bin/fsevent_watch' fsevent/fsevent_watch.c | |
fsevent/fsevent_watch.c:1:10: fatal error: 'stdio.h' file not found | |
#include <stdio.h> | |
^ | |
1 error generated. |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
### Chef Solo | |
# | |
# | |
### Opscode Hosted Chef Server | |
# | |
# export KNIFE_USER="jdoe" | |
# export KNIFE_ORGNAME="acmeco" | |
# | |
# * Your Opscode client key should be at `~/.chef.d/opscode-jdoe.pem`. | |
# * Your Opscode validation key should be at `~/.chef.d/opscode-acmeco-validator.pem`. |
Dear soon-to-be-former user, | |
We've got some fantastic news! Well, it's great news for us anyway. You, on | |
the other hand, are fucked. | |
We've just been acquired by: | |
#!/bin/sh | |
echo $* | ssh gateway "cat > /tmp/fab-runner; chmod +x /tmp/fab-runner" | |
ssh gateway -t screen bash -init-file /tmp/fab-runner | |
# Usage: gateway.sh fab production deploy |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum errors before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. | |
"node" : true, |