Skip to content

Instantly share code, notes, and snippets.


Will Leinweber will

View GitHub Profile
egmontkob /
Last active Jun 26, 2022
Hyperlinks in Terminal Emulators
robinsloan / unfave.rb
Last active Jun 5, 2022
Unfave script, because why not??
View unfave.rb
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from
@[Link(ldflags: "-lpq -I`pg_config --includedir` -L`pg_config --libdir`")]
lib LibPQ
fun connect = PQconnectdb(conninfo : UInt8*) : Void*
fun exec = PQexec(conn : Void*, query : UInt8*) : Void*
fun getvalue = PQgetvalue(res : Void*, row : Int32, column : Int32) : UInt8*
conn = LibPQ.connect("postgres:///")
res = LibPQ.exec(conn, "select 'Hello it is ' || now()"), 0, 0)) #=> "Hello it is 2015-07-15 16:30:44.396092-07"
datanoise /
Last active Mar 5, 2021
ctags for crystal language
require "compiler/crystal/**"
require "option_parser"
include Crystal
class ToCtagsVisitor < Visitor
@filename : String
@lines : Array(String)
@io : IO
@opts : Generator
will / postgres
Last active Aug 29, 2015
Running a devl build of postgres
View postgres
git clone && cd postgres
./configure --prefix=/tmp/postgres --with-openssl --with-ossp-uuid --with-libs=/usr/local/opt/readline/lib/ --with-includes=/usr/local/opt/readline/include/
# skip the readline parts if you dont have readline installed but it makes `psql` better
make -sj8
make install
/tmp/postgres/bin/initdb /tmp/postgres/data
robinsloan / langoliers.rb
Last active Jun 5, 2022
The Langoliers, a tweet deletion script
View langoliers.rb
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from
CONSUMER_KEY = "your_consumer_key"
View pg_dev
[ $NAME == "" ] && { echo usage: pg_dev NAME [DATADIR]; exit 1; }
echo Initializing database in $DATADIR
initdb $DATADIR
burke /
Created Jan 27, 2012 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.


You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

will / caveatPatchor.js
Created Oct 3, 2011
propane something awful emoticons
View caveatPatchor.js
// ~/Library/Application Support/Propane/unsupported/caveatPatchor.js
var mapping = {};
var loadEmotes = function(response) {
response.forEach(function(a){a.emoticons.forEach(function(b){mapping[b.code] = b.image})});
var match;
return mapping[match[0]];