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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
# | |
# SHOW ME | |
# Takes X pictures of you via your iSight, animates them, uploads them to CloudApp, and puts | |
# the url in your clipboard | |
# | |
# This uses a bunch of projects to make the magic happen, mostly thanks | |
# to Zach Holman: http://github.com/holman | |
# | |
# |
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 "rubygems" | |
require "activerecord" | |
require '../../munger/lib/munger' | |
ActiveRecord::Base.establish_connection( | |
:adapter => "postgresql", | |
:host => "localhost", | |
:database => "testing", | |
:username => "postgres", | |
:password => "postgres" |
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 clone git://github.com/foca/webrat.git | |
Initialized empty Git repository in /private/tmp/webrat/.git/ | |
remote: Counting objects: 4258, done. | |
remote: Compressing objects: 100% (1432/1432), done. | |
remote: Total 4258 (delta 2873), reused 4115 (delta 2770) | |
Receiving objects: 100% (4258/4258), 11.44 MiB | 620 KiB/s, done. | |
Resolving deltas: 100% (2873/2873), 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
#! /usr/bin/ruby | |
## | |
# Remove any duplicate tracks in iTunes | |
# PJ Hyett was here 11/2008 | |
framework "Cocoa" | |
framework "ScriptingBridge" | |
itunes = SBApplication.applicationWithBundleIdentifier("com.apple.iTunes") |
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
;; Issac Trotts' demonstration of pattern matching in Nu | |
(function people-to-string (people) | |
(match people | |
(() "no people") | |
((p1) "one person: #{p1}") | |
((p1 p2) "two people: #{p1} and #{p2}") | |
(else "too many people: #{(people length)}"))) | |
(assert_equal "no people" |
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 | |
require "tempfile" | |
GIST_URL = 'http://gist.github.com/gists' | |
if ARGV.include? "-p" | |
text = `pbpaste` | |
elsif !ARGV.empty? | |
@filename = ARGV.shift | |
text = File.read(File.expand_path(@filename)) |
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
01:21 <schacon> well like, lets say you use Emacs, and someone | |
posts an extension on gists, like this: http://gist.github.com/290 | |
01:22 <schacon> you use it and think it's cool, but add some | |
features, so you can fork it, make your change and even email | |
the original author, who can add you as a remote and merge your | |
change in, or several peoples changes and push back | |
01:23 <schacon> you have a list of all the gists you've ever made, | |
and can always go back and edit or update them: http://gist.github.com/mine | |
01:24 <schacon> if you have a multi-file project, like a little | |
sinatra app that maybe doesn't warrant it's own github project, |
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
.,mlkmlkml |
NewerOlder