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 | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
wget -q -O - https://raw.github.com/gist/2204072/install_tmux_1.6_on_ubuntu_10.04.sh | sudo bash |
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
-- putting current selection in clipboard | |
-- set tmux path | |
set tmux_path to "/usr/local/bin/tmux" | |
-- copy selected text to clipboard | |
tell application "System Events" to keystroke "c" using {command down} | |
delay 0.1 -- so copy can take place | |
set selected_text to (the clipboard as text) |
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
# Defines a macro in Ruby which takes a block, and evaluates the | |
# block's statements in reverse order. | |
# | |
# Requires the 'live_ast' and 'ruby2ruby' gems. Install via: | |
# | |
# gem install live_ast ruby2ruby | |
# | |
# Should work in 1.8 as well as 1.9. | |
require 'rubygems' |
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 simple two-channel euclidian sequencer (work-in-progress). | |
Currently supports one channel. Caveat: there may be bugs. I just got my Ardcore | |
and I started developing this before it arrived. | |
Given an input like (A), it should send out something like (B) in a loop: | |
(A) * * * * * * * * | |
(B) * * * |
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
// R08 stores a pointer to top of the heap | |
// a function with two parameters (lists of pointers) | |
// R09 stores the flag | |
// R10 stores a pointer to the current node in the heap | |
// R11 stores: | |
// * a pointer to the list of parameters | |
// * the return value | |
f: |
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
$.imageComplete = (callback) -> | |
$(this).one('load', callback).each -> if this.complete then $(this).load() |
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
expr '1 + 1' | |
echo $[1 + 1] | |
let variable=1+1 # spaces are illegal | |
echo '6 ^ 10' | bc | |
bc <<< '13 / 5' # use heredoc notation to pass parameters to bc |
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 'formula' | |
class FlashPlayer < Formula | |
url 'http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug.app.zip' | |
md5 '2770acd6997bfd5016dd51acfb20c025' | |
homepage 'http://adobe.com' | |
version '11.1' | |
def install | |
name = 'Flash Player Debugger.app' |
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
hexToBuffer = (hex, padding) -> | |
n = lpad hex.toString(16), '0', padding | |
list = [] | |
while n.length > 0 | |
head = n.substr 0, n.length - 2 | |
tail = n.substr n.length - 2 | |
list.unshift parseInt tail, 16 |