Skip to content

Instantly share code, notes, and snippets.

window.addEventListener "DOMContentLoaded", ->
body = $ "body"
canvas = $ "#canvas"
chalkboard = $ "#chalkboard"
close = $ "#close"
ledge = $ "#ledge"
lightswitch = $ "#lightswitch"
output = $ "#output"
shade = $ "#shade"
share = $ "#share"
@jrom
jrom / download-from-s3.rb
Created November 2, 2010 12:02
For downloading assets (in this case Paperclip attachments) from S3 to local filesystem
require 'aws/s3'
AWS::S3::Base.establish_connection!(
:access_key_id => 'id',
:secret_access_key => 'secret'
)
missing_uploads = [1,2,3,4] # ID's from the attachments you want to download
log = File.open('file-import-log.txt','w')
@tvandervossen
tvandervossen / .kick
Created October 12, 2010 20:18
Reload browser on save Kicker recipe
process do |files|
execute("osascript -e 'tell application \"WebKit\"
do JavaScript \"window.location.reload()\" in first document
end tell'")
end
#!/custom/ree/bin/ruby
# USAGE:
#
# echo "|/path/to/core_helper.rb %p %s %u %g" > /proc/sys/kernel/core_pattern
#
require 'etc'
require 'net/smtp'
@vgrichina
vgrichina / git-interactive-merge.sh
Created December 23, 2009 22:11
Interactive merge utility for Git, as described here http://www.angrylibertarian.com/node/53
#!/bin/bash
# git-interactive-merge
# Taken from: http://www.angrylibertarian.com/node/53
from=$1
to=$2
if [[ ( -z $from ) || ( -z $to ) ]]; then
echo "Usage:"
echo " git-interactive-merge <from-branch> <to-branch>"
exit 1