Skip to content

Instantly share code, notes, and snippets.

View alessani's full-sized avatar

Matteo Alessani alessani

View GitHub Profile
@bruschill
bruschill / vim_presentation.rb
Created September 18, 2012 15:21
irb text editor brawl
# n: Brandon Ruschill
# c: github.com/bruschill
# t: @bruschill
# BASICS (command mode)
# never ever use the arrow keys. ever
#
# k
# h l
# j
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: sudo $0 /dev/sdh1"
exit 1;
fi
dd if=$1 of=/dev/null & pid=$!
while true; do
ps -p$pid --no-heading || break;
echo "-- $(date) ------------------";
@electricjesus
electricjesus / doubledecode-htmlent.py
Created March 13, 2012 17:13 — forked from litchfield/doubledecode.py
Double decode utf8 and cp1252
#!/usr/bin/env python
"""
modded doubledecode.py
Seth Malaki (seth d-o-t malaki a-t gmail d-o-t com)
mainly this modification aims to replace special characters with html entities instead.
Test status: todo/untested.
@bradmontgomery
bradmontgomery / apt_postgresql_ppa.rb
Created February 10, 2012 22:33
To install PostgresSQL 9.1 on Ubuntu 10.04 with Chef
# mycookbook/recipes/apt_postgresql_ppa.rb
#
# This recipe should add the sources for
# PostgreSQL 9.1 using the PPA available at:
# https://launchpad.net/~pitti/+archive/postgresql
apt_repository "postgresql" do
uri "http://ppa.launchpad.net/pitti/postgresql/ubuntu"
distribution node['lsb']['codename']
components ["main"]