Skip to content

Instantly share code, notes, and snippets.

function! PGrep(pattern, ...)
let pattern = a:pattern
if a:0 == 0
let ext = '*'
else
let ext = a:1
endif
let proj_path = system("echo $PROJ_PATH | tr -d '\n'")
function! PGrep(pattern, ...)
let pattern = a:pattern
if a:0 == 0
let ext = '*'
else
let ext = a:1
endif
-- Standard awesome library
require("awful")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Load Debian menu entries
require("debian.menu")
#!/bin/bash
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.
# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval `dbus-launch --sh-syntax --exit-with-session`
fi
"""
For Pylons 0.97, optionally with asplake's Routes fork with {.format} parameter support
1) fill_render(), a render() that encodes repeating groups properly
2) A refactored @validate with
a) JSON support
b) cleaned-up form_errors that render properly in the presence of repeating groups
c) some possibility of extensibility
3) JSON-related helpers: sent_json(), accepts_json(), render_json()
4) formatted_url(), a url() that remembers any format extension on the request
5) BaseSchema, a formencode.Schema with sensible defaults
import logging
try:
import json
except ImportError:
import simplejson as json
log = logging.getLogger(__name__)
@mitechie
mitechie / Vim Open Space
Created January 13, 2011 22:02
notes/links from the Codemash Vim openspace
My Vim Stuff
~~~~~~~~~~~~~~
http://github.com/mitechie/pyvim
http://www.delicious.com/deuce868/vim
Screencasts
~~~~~~~~~~~~
Derek: http://www.derekwyatt.org/vim/vim-tutorial-videos/
Vimcasts: http://vimcasts.org/
Shameless plug: http://lococast.net/archives/category/screencast
function! s:encodeURIComponent(instr)
let instr = iconv(a:instr, &enc, "utf-8")
let len = strlen(instr)
let i = 0
let outstr = ''
while i < len
let ch = instr[i]
if ch =~# '[0-9A-Za-z-._~!''()*]'
let outstr = outstr . ch
elseif ch == ' '
#!/usr/bin/env python
"""
Generate a paster template set of files from the project
"""
import sys
import os
import re
import shutil
@mitechie
mitechie / gist:993332
Created May 26, 2011 15:08
#31 node-postgres
var net = require('net'),
pg = require('pg'),
inspect = require('sys').inspect;
var LISTEN_PORT = 8888,
DBSTRING = "tcp://nocontact:nocontact@localhost/nocontact";
var commands = {
'check': function (email) {
console.log('in check');