Skip to content

Instantly share code, notes, and snippets.

View vagmi's full-sized avatar

Vagmi Mudumbai vagmi

View GitHub Profile
@vagmi
vagmi / download_dilbert.py
Created November 18, 2008 09:25
some bug fixes
import urllib2
import datetime
import os.path
from BeautifulSoup import BeautifulSoup
dilbert_dir = 'c:\\work\\toons\\dilbert\\'
year=2007
start_date=datetime.date(year,1,1)
one_day = datetime.timedelta(days=1)
import urllib2
import datetime
import os.path
from BeautifulSoup import BeautifulSoup
dilbert_dir = 'c:\\work\\toons\\dilbert\\'
year=2007
start_date=datetime.date(year,1,1)
one_day = datetime.timedelta(days=1)
import re
from reportlab.platypus import Image, SimpleDocTemplate, Spacer,Flowable
from reportlab.lib.units import inch
import dircache
import Image as PILImage
import os.path
months = ["January", "Feburary", "March","April","May","June","July","August","September","October","November","December"]
class Bookmark(Flowable):
def __init__(self,title,key,level):
(add-hook 'html-helper-mode-hook
(lambda ()
(defun tidy-html ()
(interactive)
(save-excursion
(call-process-region (point-min) (point-max)
"c:\\tools\\tidy.exe" t '(t nil) nil "-i" "-asxml")))
(define-key html-helper-mode-map [f7] 'tidy-html)))
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
exit 1
fi
# video encoding bit rate
V_BITRATE=1000
startshape myshape
background { hue 158.59 sat .6087 b -1}
rule myshape
{
20 * {r 36} spiral {}
}
class A
def A.say_hello
"hello"
end
end
'''
outlook.pyw (OutLook editor launcher) -- allows one to edit an open e-mail
mesg from Outlook using Emacs or *Vi* rather than "Notepad--". :-)
NOTE: requires Python 1.6 and newer (use of string methods)
created by John Klassa (klassa at employees.org) on 2001 May 29
updated by Wesley Chun (cyberweb at rocketmail.com) on 2002 Feb 28
$Id: outlook.pyw,v 0.2 2002/08/28 18:04:06 wesc Exp wesc $
'''
@vagmi
vagmi / .vimrc
Created February 26, 2009 07:16
filetype plugin on
"filetype off
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
set vb
set autoindent
set smarttab
set expandtab
set tabstop=2
$:.unshift File.join(File.dirname(__FILE__),'lib/sinatra/lib')
require 'rubygems'
require 'sinatra'
use_in_file_templates!
get '/:name' do
params['title'] = 'Sinatra and Liquid rocks'
liquid :index, :locals => params
end