Public Gists by adamv

gist: 232227 init.d for MongoDB
Gravatar
Wed Nov 11 11:41:20 -0800 2009
1
2
3
#! /bin/sh
 
### BEGIN INIT INFO
Gravatar
Thu Sep 24 10:11:29 -0700 2009
1
2
3
<mxcl> the github gem makes it so easy to contribute to a new project
<mxcl> gh clone foo
<mxcl> gh fork
gist: 181221 Django view decorator for a...
Gravatar
Fri Sep 04 16:56:34 -0700 2009
1
2
3
def allowed(allowed_methods):
    def _wrap(view_function):
        def decorator(*args, **kw):
Gravatar
Sat Aug 29 17:00:46 -0700 2009
1
2
3
      === Epic Snow Leopard Upgrayyyyd Guide ===
 
Son, you’re now living in the land of 64-bit systems.
Gravatar
Fri Aug 28 13:24:47 -0700 2009
1
2
3
# Code originally from http://www.djangosnippets.org/snippets/1582/
# Modified by adamv:
# * Dispatch methods are in UPPERCASE and may only be those verbs defined in
Gravatar
Fri Aug 28 10:28:22 -0700 2009
1
2
3
All curl downloads occurred in ~/Sources.
 
Get PIL::
Gravatar
Thu Aug 27 12:34:20 -0700 2009
1
2
3
cd /tmp
wget http://codespeak.net/lxml/lxml-2.2.2.tgz
tar -xzvf lxml-2.2.2.tgz
Gravatar
Wed Aug 26 15:06:57 -0700 2009
1
2
3
In settings.py:
_OUR_APPS = (
    'app1',
Gravatar
Wed Aug 26 11:01:43 -0700 2009
1
2
3
#if __APPLE__
#include <crt_externs.h>
#define environ *_NSGetEnviron();
Gravatar
Mon Aug 24 17:31:29 -0700 2009
1
2
3
import os
from datetime import date
 
Gravatar
Tue Aug 04 14:23:30 -0700 2009
1
GRANT ALL on *.* to root@'%';
Gravatar
Fri Jun 19 10:35:40 -0700 2009
1
2
3
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
Gravatar
Mon Jun 08 16:50:14 -0700 2009
1
2
3
#/bin/bash
 
if [[ -z $1 ]]; then
Gravatar
Thu Jun 04 14:00:08 -0700 2009
1
2
target=${1/\//\-}.zip
curl -L http://github.com/$1/zipball/master -o $target
gist: 87273 Ignores for .NET projects.
Gravatar
Sat Mar 28 20:14:15 -0700 2009
1
2
3
_ReSharper.*
bin
obj
gist: 82971 Reveal current dir in Path ...
Gravatar
Sat Mar 21 13:29:06 -0700 2009
1
2
3
# Reveal current dir in Path Finder
pf()
{
gist: 82950 What .git repo am I in?
Gravatar
Sat Mar 21 12:25:08 -0700 2009
1
git rev-parse --git-dir