Skip to content

Instantly share code, notes, and snippets.

@igorgue
igorgue / .bash_profile
Created September 5, 2012 06:18
YouTube video aliases
alias happydance="open http://youtube.googleapis.com/v/pAKVJIZHLdo?autoplay=1"
alias fcwm="open http://youtube.googleapis.com/v/r5vMkV2OqvY?autoplay=1"
alias whatsup="open http://youtube.googleapis.com/v/ZZ5LpwO-An4?autoplay=1"
alias dayman="open http://youtube.googleapis.com/v/S_JUlXh7sP8?autoplay=1"
alias peepee="open http://youtube.googleapis.com/v/h9hGc1bc610?autoplay=1"
alias guilekfc="open http://youtube.googleapis.com/v/FXRAsUOblV4?autoplay=1"
string at 523601
pre each_char, length is
post each_char, length is 0
post reading string pos is 523603
string objects len is 0
string at 523603
pre each_char, length is
post each_char, length is 12
post reading string pos is 523618
string objects len is 12
# Fiddly.
def binary_search(haystack, needle, lo=0, hi=None, size=None):
if hi is None:
hi = len(haystack) - 1
if size is None:
size = len(haystack)
if size == 0:
return -1
t = ((hi - lo) / 2)
module YataWindow ( YataWindow
, new, showAll
, onMessagePost
, displayTweets
)
where
import Control.Applicative
import Text.Printf (printf)
@igorgue
igorgue / README
Created December 23, 2009 14:55 — forked from mojombo/README
Another mustache.erl example, this time showing off lists and asking for context in one of the view functions.
@igorgue
igorgue / gist:220844
Created October 28, 2009 21:11 — forked from leah/gist:216443
:⌉
=⌉
¦-) as opposed to |
⍥ om nom nom
@igorgue
igorgue / gist:193580
Created September 25, 2009 14:37 — forked from dominiek/gist:193515
curl -d 'track=one line' http://stream.twitter.com/track.json -uonelinebot:one.onelinebot > tweets.json 2> /dev/null & tail -f tweets.json | while read tweet; do echo $tweet | grep -E -o '"screen_name":"[[:alnum:]]+"' | cut -d '"' -f 4 | while read screen_name; do echo "following: $screen_name"; curl -d '' http://twitter.com/friendships/create/$screen_name.json?follow=true -uonelinebot:one.onelinebot; done ; done

(This is the text of the keynote I gave at Startup Riot 2009. Will update when video becomes available.)

Hi everyone, I’m Chris Wanstrath, and I’m one of the co-founders of GitHub.

GitHub, if you haven’t heard of it, has been described as “Facebook for developers.” Which is great when talking about GitHub as a website, but not so great when describing GitHub as a business. In fact, I think we’re the polar opposite of Facebook as a business: we’re small, never took investment, and actually make money. Some have even called us successful.

Which I’ve always wondered about. Success is very vague, right? Probably even relative. How do you define it?

After thinking for a while I came up with two criteria. The first is profitability. We employ four people full time, one person part time, have thousands of paying customers, and are still growing. In fact, our rate of growth is increasing – which means January was our best month so far, and February is looking pretty damn good.

import feedparser
import datetime
import time
def get_tweets(query, page):
feeds = feedparser.parse("http://search.twitter.com/search.atom?q=" + str(query) + "&rpp&page=" + str(page) + "&show_user=true")
return feeds.entries
def get_html_tweets(query, page):
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject {
IBOutlet NSTextField *inputTextField;
IBOutlet NSTextField *outputTextField;
}
- (IBAction)countCharacters:(id)sender;
@end