Skip to content

Instantly share code, notes, and snippets.

# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
#!/usr/bin/env ruby
#
# Copyright (c) 2010 Joe Mahoney
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
set lines=35
set columns=90
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
set bg=dark
colorscheme molokai
@mwunsch
mwunsch / html5.vim
Created August 12, 2010 20:58 — forked from rcmachado/html5.vim
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2009 May 13
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
[user]
name = Jamie Wilkinson
email = jamie@jamiedubs.com
[github]
user = jamiew
token = <REDACTED>
[apply]
whitespace = nowarn
[branch]
autosetuprebase = always
def tip(msg); puts; puts msg; puts "-"*100; end
#
# 30 Ruby 1.9 Tips, Tricks & Features:
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/
#
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2"
tip "Ruby 1.9 supports named captures in regular expressions!"
import requests
class Content(object):
def where(self, params={}):
return Query(self).where(params)
def all(self):
return Query(self).all()
class Query(object):