Skip to content

Instantly share code, notes, and snippets.

View lnsoso's full-sized avatar

lnsoso lnsoso

  • 3718 Northern Blvd, Long Island City, NY 11101
View GitHub Profile
@defunkt
defunkt / startupriot.markdown
Last active January 18, 2025 01:28
Startup Riot 2009 Keynote

(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.

#!/bin/bash
############################################################################
# Script to open a directory in TextMate excluding certain directories that
# tend to slow down the Find in Project... function.
#
# Place in an executable loctation with a name of your choosing.
# I use `ate' and have it in ~/Local/bin (which has been added to $PATH)
############################################################################
@webcracy
webcracy / wordpress2tumblr.rb
Created September 26, 2009 17:51
A script to import your Wordpress posts on Tumblr
# Export your Wordpress posts to Tumblr (also allows to delete some.)
# Author: Alexandre Solleiro <[email protected]>
# How-to:
# 1. Export your Wordpress posts (http://en.blog.wordpress.com/2006/06/12/xml-import-export/)
# 2. Edit the information below to match your settings
# 3. To import, type "ruby wordpress2tumblr.rb --run" in the command line
# 4. To delete some posts, type "ruby wordpress2tumblr.rb --delete 1,2,3,4" where 1,2,3,4 are post numbers. (Be careful not to use spaces between IDs)
# Edit these
WP_EXPORT_PATH = "./wordpress.2009-09-14.xml" # path to the Wordpress Export file
@defunkt
defunkt / installing-Mustache.tmbundle.md
Created March 6, 2010 10:27
Installing Mustache.tmbundle
#!/usr/bin/env python
# Usage:
# This script will generate two files(vpnup and vpndown) after executing.
# Do chmod a+x on the two newly created files, and then move them to the
# openvpn config folder. then add the following two lines to the vpn config file:
# up vpnup
# down vpndown
# you might also need 'redirect-gateway' in the config file, if you don't use vpn
# as the default gateway.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <hiredis/libevent.h>
void getCallback(redisContext *c, redisReply *reply, const void *privdata) {
printf("argv[%s]: %s\n", (const char*)privdata, reply->reply);
/* Disconnect after receiving the reply to GET */
redisDisconnect(c);
<?php
/*
API Google URL Shortner
marcusnunes.com
*/
echo goo::get('http://www.baidu.com');
class goo{
function get($url){
$error = '';
@ninehills
ninehills / .vimrc
Created November 14, 2010 09:37
VIMRC
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 一般设定
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 设定主题
colo evening
" 设定默认解码
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936
@flaneur2020
flaneur2020 / .vimrc
Created November 14, 2010 11:07
my .vimrc
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
syntax on
filetype plugin on
"about tab
set autoindent
@mattetti
mattetti / nested_merge.rb
Created December 2, 2010 06:45
nest merge hashes
h1 = {:key => {a: 1, b: 2, c: {a: 1, b: 2}}}
h2 = {:key => {c: {a:'a', c: 'c'}, d: 4}}
recursive_merge = lambda do |k, old, new|
(new.respond_to?(:merge) && old.respond_to?(:merge)) ? new.merge(old, &recursive_merge) : new
end
puts h1.merge(h2, &recursive_merge)
# => {:key=>{:a=>1, :b=>2, :c=>{:a=>"a", :b=>2, :c=>"c"}, :d=>4}}