Skip to content

Instantly share code, notes, and snippets.

View radamant's full-sized avatar

Adam Pearson radamant

  • The Instrumental Group
  • Olympia
View GitHub Profile
@radamant
radamant / gist:702914
Created November 17, 2010 02:58
a-ha!
redis> lrange test-index-list 0 -1
1. "4"
2. "3"
3. "2"
4. "1"
redis> set test-index-index:4 100
OK
redis> set test-index-index:4 100
OK
redis> set test-index-index:3 500
#!/usr/bin/env bash
echo "Gem path: $GEM_PATH"
echo "Gem home: $GEM_HOME"
echo "Ruby version: $(ruby -v)"
echo ""
if ! `gem list rake -iq`
then
gem install --no-ri --no-rdoc bundler
else
def self.default(options = {})
# Guess.
if ENV.include?("PHP_FCGI_CHILDREN")
# We already speak FastCGI
options.delete :File
options.delete :Port
Rack::Handler::FastCGI
elsif ENV.include?("REQUEST_METHOD")
Rack::Handler::CGI
function! ReloadAllBuffers()
set noconfirm
:bufdo e!
set confirm
endfunction
" flog wrappers
function! FlogFile()
let current = fnamemodify(expand("%"), ':p')
call FlogAnalyze(current)
endfunction
function! FlogAll()
call FlogAnalyze('app lib -g')
endfunction
@radamant
radamant / radamant.js
Created April 25, 2011 05:20
corny pseudo-js-english description of a web site
var radamant = Site({
supportsShittyBrowsers: false;
});
radamant.addFeature( CodeGallery({
interactive: true,
nonLinearPath: true,
linkable: true
}));
set conf_name to text returned of ¬
(display dialog ¬
"Enter conference name:" with title ¬
"Schedule Conference" default answer ¬
"" default button 2)
tell application "Things"
set newProject to make new project ¬
with properties {name:conf_name}
end tell
@radamant
radamant / gist:969014
Created May 12, 2011 17:30
tmux.conf
unbind C-b
set -g prefix C-j
set-window-option -g mode-keys vi
bind r source-file ~/.tmux.conf
set -g status-fg black
set -g status-fg white
set -g status-left '#[fg=blue](#S) #[default]'
setw -g window-status-current-attr bold
setw -g window-status-current-fg white

Marjoram / Thyme Chicken

Serves 2

Meat:

  • 2 chicken breasts

Rub:

@radamant
radamant / ignoreEnterSpec.coffee
Created July 21, 2011 20:43
Jasmine spec in coffeescript
describe 'jQuery.fn.ignoreEnter', ->
beforeEach ->
setFixtures '<input />'
$('input').ignoreEnter()
describe 'pressing enter', ->
event = null
beforeEach ->
event = jQuery.Event 'keypress'