Skip to content

Instantly share code, notes, and snippets.

@funkybrain
funkybrain / postgres_help.rb
Created February 8, 2012 16:02
Postgresql: post-its and other lifesavers
# list all databases
psql -l
# list all tables
psql autruche.db -c "\d"
# start server
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
# and stop with:
@funkybrain
funkybrain / Python 101
Created June 5, 2012 09:57
Python: Password Hashing
return "%s, %s" % (s, hash_str(s))
import hmac
hmac.new("secret","udacity").hexdigest()
@funkybrain
funkybrain / JavaScript: Handlebars
Created November 21, 2012 00:00
JavaScript: Handlebars Templating
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Handlebars</title>
<style>
span {
color: red;
font-size: 0.5em
@funkybrain
funkybrain / gist:4130870
Created November 22, 2012 12:17 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt