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
if File.exists? '.env' | |
File.readlines('.env'). | |
map{|l| l.chomp }. | |
reject{|l| l.empty?}. | |
map{|l| l.split '='}. | |
each {|k,v| ENV[k] ||= v} | |
end | |
IRB.conf[:USE_READLINE] = true | |
IRB.conf[:AUTO_INDENT] = 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
using System.Threading; | |
using System.Runtime.InteropServices; | |
using System.Diagnostics; | |
namespace Fleck |
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
set t_Co=16 | |
call pathogen#runtime_append_all_bundles() | |
syntax on | |
"let g:solarized_termcolors=256 | |
colorscheme solarized | |
set background=dark | |
filetype plugin indent on | |
set nocompatible " We don't want vi compatibility. |
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
#!/usr/bin/env ruby | |
git_bundles = [ | |
"git://github.com/msanders/snipmate.vim.git", | |
#"git://github.com/scrooloose/nerdtree.git", | |
#"git://github.com/tpope/vim-haml.git", | |
"git://github.com/tpope/vim-markdown.git", | |
#"git://github.com/tpope/vim-rails.git", | |
#"git://github.com/tpope/vim-repeat.git", | |
#"git://github.com/tpope/vim-surround.git", |
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
# A queue that you can pass to IO.select. | |
# | |
# NOT THREAD SAFE: Only one thread should write; only one thread should read. | |
# | |
# Purpose: | |
# Allow easy integration of data-producing threads into event loops. The | |
# queue will be readable from select's perspective as long as there are | |
# objects in the queue. | |
# | |
# Implementation: |
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
error do | |
exception = request.env['sinatra.error'] | |
Hoptoad::Notifier.send_error exception, params, request.env if %w(staging production).include?(ENV['RACK_ENV']) | |
erb :five_hundred | |
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
# {"1"=>"a", "2"=>"b" ... } | |
CHARS = Hash[('a'..'z').each_with_index.map{|char, i| [i.succ.to_s, char]}] | |
def decode(encoded, cur=[]) | |
return cur.join if encoded.nil? || encoded.empty? | |
h1 = CHARS[encoded[0]] | |
h2 = CHARS[encoded[0,2]] | |
result = [] | |
result << decode(encoded[1..-1], cur+[h1]) if h1 && encoded[1] != '0' |
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
gem: --no-rdoc --no-ri |
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/sh | |
FORMAT=$(echo -e "\033[1;33m%w%f\033[0m written") | |
"$@" | |
while inotifywait -qre close_write --exclude "/\." --format "$FORMAT" . | |
do | |
"$@" | |
done |
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
--- | |
BUNDLE_BIN: vendor/bundle/bin | |
BUNDLE_PATH: vendor/bundle | |
BUNDLE_DISABLE_SHARED_GEMS: '1' |