I hereby claim:
- I am codegnome on github.
- I am codegnome (https://keybase.io/codegnome) on keybase.
- I have a public key whose fingerprint is 49AC A1C8 9F24 6338 62F9 6F91 2E85 63CE 12A7 5526
To claim this, I am signing this object:
#!/usr/bin/env bash | |
npm install ember-cli | |
npm install bower | |
npm install phantomjs | |
rcfile="$HOME/.bashrc" | |
if ! grep -Fq node_modules "$rcfile"; then | |
echo 'export PATH="$PATH:$HOME/node_modules/.bin"' | tee -a "$rcfile" | |
fi |
CC=clang ruby-install rbx 2.5.1 --sha1 5096b28f6b91968c7554946d55eefc218603c9a8 -- --llvm-config /opt/local/bin/llvm-config-mp-3.3 |
#!/bin/sh | |
# Use standard location of port command to detect MacPorts. | |
if [ -x /opt/local/bin/port ]; then | |
# Query port for path to latest version of llvm-config. Selects | |
# latest version with tail if more than one version is installed | |
# with tail. | |
port contents $(port installed | egrep -o 'llvm-[^ ]+' | tail -1) | | |
# Uses head to avoid binaries in libexec rather than bin. | |
fgrep llvm-config | head -1 |
echo 'SSH Public Key for Yubikey NEO' | |
echo '------------------------------' | |
gpgkey2ssh $( | |
gpg --card-status 2>&1 | | |
pcregrep -o '^Authentication.*\K.{9}$' | | |
tr -d ' ' | |
) |
class Animal | |
# Use an instance method instead of a getter/setter. | |
def make_noise sound | |
p sound | |
end | |
end | |
cow = Animal.new | |
cow.make_noise "Moo!" | |
#=> "Moo!" |
#!/bin/bash | |
function remove_dir () { | |
rm -rf "$1_" | |
if [ -d "$1" ] | |
then | |
mv "$1" "$1_" | |
fi | |
} |
I hereby claim:
To claim this, I am signing this object:
# See http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm | |
# written as one-liners because my REPL didn't like multiline functions this morning | |
# tested on CoffeeScript v1.0.1 | |
input = [0 .. 7] | |
swap = (input, x, y) -> [input[x], input[y]] = [input[y], input[x]] | |
rand = (x) -> Math.floor(Math.random() * x) | |
durst = (input) -> swap(input, i, rand(i)) for i in [input.length - 1 .. 1] | |
""" |
exec { '/bin/bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)': | |
provider => shell, | |
creates => '/home/vagrant/.rvm', | |
cwd => '/tmp', | |
user => 'vagrant', | |
} |
f1 = File.open('foo', File::RDWR|File::CREAT, 0644) | |
f1.flock(File::LOCK_EX) | |
# => 0 | |
f2 = File.open('foo', File::RDWR|File::CREAT, 0644) | |
f2.flock(File::LOCK_NB|File::LOCK_EX) | |
# => false | |
f1.close; f2.close | |
# => nil |