Skip to content

Instantly share code, notes, and snippets.


Blake Jakopovic blakejakopovic

View GitHub Profile
gus / index.txt
Created Nov 30, 2009 — forked from toothrot/index.txt
Ruby/Clojure analogs
View index.txt
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from,
ruby-to-clojure.*/* functions can be obtained from the source files in this
If no method symbol is given, we use the following notation:
kneath /
Created Dec 4, 2009
Badass git pull alias (up) to show commit log that just got pulled in addition to changes

Badass git pull alternative

Add this little snippet to your ~/.gitconfig and it amps up your git pull by means of git up

  1. Adds in a list of the commits you're pulling down
  2. Auto-prunes remote branches
  3. Defaults to pull --rebase - gets rid of unnecessary merge commits. If you don't know what rebase does, this is probably safe for you. If you know what rebase does, you should know where this will not be safe for you.

Scott Chacon and Ryan Tomayko basically figured out how to do this and I am stealing all of the credit.

ghoseb / ns-cheatsheet.clj
Last active Nov 13, 2021 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
View ns-cheatsheet.clj
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;; * :import refers Java classes to the current namespace.
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
View gist:296921
gemcutter => redis downloads spec
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads
View deploy.rake
task :deploy => ['deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
task :migrations => [:push, :off, :migrate, :restart, :on, :tag]
task :rollback => [:off, :push_previous, :restart, :on]
task :push do
puts 'Deploying site to Heroku ...'
puts `git push heroku`
koenbollen /
Created Jul 5, 2010
Proof of Concept: UDP Hole Punching
#!/usr/bin/env python
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
# This is the client.
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
shripadk / gist:652819
Created Oct 29, 2010
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
View gist:652819
Module dependencies
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
mxgrn / gist:663933
Created Nov 5, 2010
Git's pre-commit hook to remove trailing whitespaces/tabs
View gist:663933
# This will abort "git commit" and remove the trailing whitespaces from the files to be committed.
# Simply repeating the last "git commit" command will do the commit then.
# Put this into .git/hooks/pre-commit, and chmod +x it.
if git rev-parse --verify HEAD >/dev/null 2>&1
creationix / chatServer.js
Created Nov 19, 2010
A simple TCP based chat server written in node.js
View chatServer.js
// Load the TCP Library
net = require('net');
// Keep track of the chat clients
var clients = [];
// Start a TCP Server
net.createServer(function (socket) {
// Identify this client
ruel /
Created Nov 26, 2010
A script to scrape information from your facebook friends.
InFB - Information Facebook
Usage: user@domain.tld password
Copyright (c) 2011, Ruel Pagayon
All rights reserved.