Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Edit your cygwin files in notepad++, the best windows editor.
# Vim and emacs don't seem to work too well in cygwin.
ROOT_DIR_WINDOWS=D:\\\\cygwin
expandToWindows() {
y=`echo $1| sed -e 's/\//\\\\/g'`
echo $ROOT_DIR_WINDOWS\\$y
}
expArg=`expandToWindows $1`
@prasincs
prasincs / x.js
Created July 26, 2009 19:21 — forked from tssm0n/x.js
CmdUtils.CreateCommand({
names: ["java"],
arguments: [{role: "object",
nountype: noun_arb_text,
label: "search criteria"}],
icon: "http://www.sun.com/favicon.ico",
preview: "Searches The Java 6 API.",
help: "Enter the name of the Java class or package for which you would like to see the documentation.",
author: {name: "KS", email: "tss@cornbread.com"},
/* Pydoc.js
* Author: Prasanna Gautam
* Purpose: Search pydoc for terms from the browser
* You could replace it with your pydoc running on localhost if you want to search your packages.
*/
CmdUtils.CreateCommand({
names: ["pydoc"],
description: "Searches for python documentation for the term you're searching for",
arguments: [{role: 'object', nountype: noun_arb_text}],
author: "Prasanna Gautam",
"""
Author: Prasanna Gautam
Purpose: Get all the jar files in the current working directory and put them in the jython path so that the packages can be imported.
"""
import sys
import glob
currDir = sys.currentWorkingDir()
sys.path.append(map(lambda x: currDir+"/"+x, glob.glob('*.jar')))
tar -czvf backup.tar.gz --exclude-from=/tmp/exclude .
"""
LoadFromGladeFile.py
Description: load the glade file easily
Author: Prasanna Gautam
Info: Works with libglade for the .glade file
"""
import sys
import pygtk
pygtk.require('2.0')
import gtk
// ==UserScript==
// @name Hide read news posts
// @namespace http://nextdoorhacker.com/projects
// @include http://news.ycombinator.com/
// @include http://slashdot.org/
// @include http://www.reddit.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js
// ==/UserScript==
(function() {
// ==UserScript==
// @name Show all assignments moodle
// @namespace http://nextdoorhacker.com/projects
// @include http://bowtie.cc.trincoll.edu/course/view.php?id=408
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js
// ==/UserScript==
jQuery("li:has(a)", "tr.section:even").each(function(index,value){
var link = jQuery(this).find("a").attr("href");
var loc = jQuery(this);
; A snake program adapted from Stewart Halloway's Programming Clojure
; Author: Prasanna Gautam
(ns reader.snake
(:import (java.awt Color Dimension)
(javax.swing JPanel JFrame Timer JOptionPane JLabel)
(java.awt.event ActionListener KeyListener))
(:use clojure.contrib.import-static [clojure.contrib.seq-utils :only (includes?)]))
(import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_UP VK_DOWN)
(def width 75)