This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'webrick' | |
server = WEBrick::HTTPServer.new :Port => 8000 | |
server.mount_proc '/' do |req, res| | |
puts req.inspect | |
res.body = nil | |
end | |
trap 'INT' do server.shutdown end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get install -y distcc distcc-pump ccache | |
sed -ie 's/STARTDISTCC="false"/STARTDISTCC="true"/' /etc/default/distcc | |
sed -ie 's/ALLOWEDNETS="127.0.0.1"/ALLOWEDNETS="192.168.0.0\/16 172.16.0.0\/12 10.0.0.0\/8"/' /etc/default/distcc | |
sed -ie 's/LISTENER="127.0.0.1"/LISTENER="0.0.0.0"/' /etc/default/distcc | |
sed -ie "s/JOBS=\"\"/JOBS=\"`grep processor /proc/cpuinfo | wc -l`\"/" /etc/default/distcc | |
sed -ie 's/ZEROCONF="false"/ZEROCONF="true"/' /etc/default/distcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", | |
"*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", | |
"*.swf", "*.jar", "*.zip" | |
], | |
"caret_style": "phase", | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"detect_indentation": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load benchmark from stdlib | |
require 'benchmark' | |
# Pre-compute 10 million integers, return nothing to stdout in IRB | |
a = (0..9999999).to_a; nil | |
# Run the test 10x to isolate any fluctuation | |
(0..9).each do | |
Benchmark.bm do |x| | |
x.report("Double Quotes") { a.each {"This is a string"} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ap' | |
options = Hash.new(nil) | |
key = nil | |
ARGV.each do |arg| | |
arg = arg.dup | |
if arg.gsub!(/^--/, '') | |
key = arg.to_sym | |
options[key] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"author": "Alex Conner <[email protected]>", | |
"name": "spellbot", | |
"dependencies": { | |
"wordsworth": ">=0.1.0", | |
"irc": ">=0.3.6" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo ' | |
GIT_REPO=$HOME/site | |
TMP_GIT_CLONE=$HOME/tmp/site | |
# Load RVM into a shell session *as a function* | |
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then | |
# First try to load from a user install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CodeStation:learnrust codatory$ rust run iteration.rs | |
iteration.rs:5:10: 5:11 error: expected `;` or `}` after expression but found `x` | |
iteration.rs:5 foreach x in xs.iter() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-tree --name-only -r HEAD | egrep -i '\.(scss|css|js|coffee|rb|html|haml|erb|rake)$' | egrep -v '^vendor' | xargs -o -n1 git blame --line-porcelain | grep "^author " | sed 's/author //' | sort | uniq -c | sort -nr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git ls-tree --name-only -r HEAD | egrep -i '\.(scss|css|js|coffee|rb|html|haml|erb|rake)$' | egrep -v '^vendor' | xargs -o -n1 git blame --line-porcelain | grep "^author " | sed 's/author //' | sort | uniq -c | sort -nr |