Skip to content

Instantly share code, notes, and snippets.

@funkybrain
funkybrain / gist:4130870
Created Nov 22, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:4130870

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
@funkybrain
funkybrain / JavaScript: Handlebars
Created Nov 21, 2012
JavaScript: Handlebars Templating
View JavaScript: Handlebars
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Handlebars</title>
<style>
span {
color: red;
font-size: 0.5em
@funkybrain
funkybrain / Python 101
Created Jun 5, 2012
Python: Password Hashing
View Python 101
return "%s, %s" % (s, hash_str(s))
import hmac
hmac.new("secret","udacity").hexdigest()
@funkybrain
funkybrain / postgres_help.rb
Created Feb 8, 2012
Postgresql: post-its and other lifesavers
View postgres_help.rb
# 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: