Skip to content

Instantly share code, notes, and snippets.

@dataolle
dataolle / sendxbmc.sh
Created December 4, 2012 18:50
send url to xbmc's json-rpc service for playback on the big screen
#!/bin/bash
#set url and port to the xbmc box webservice
XBMC_HOST="http://127.0.0.1:8080"
if [ "$1" = "" ]; then
echo -n "Insert URL: "
read url
else
url="$1"
fi
@sattvik
sattvik / HelloActivity.clj
Created April 11, 2012 18:57
HelloActivity.clj
(ns com.example.hello_clojure.HelloActivity
(:gen-class :main false
:extends android.app.Activity
:exposes-methods {onCreate superOnCreate})
(:import [com.example.hello_clojure R$layout]))
(defn -onCreate
[this bundle]
(doto this
(.superOnCreate bundle)
@wesm
wesm / function_lengths.py
Created January 8, 2012 22:34
Count all function lengths under a directory
from pandas import DataFrame
from pandas.util.testing import set_trace
import os
import numpy as np
import matplotlib.pyplot as plt
dirs = []
names = []
lengths = []
@xzj
xzj / clojure.ctags
Created December 25, 2011 07:00
my .ctags(exuberant-ctags) for Clojure
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
--regex-clojure=/\([ \t]*defmethod[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/b,multimethod instance/
anonymous
anonymous / ec2unifiedshell.py
Created January 20, 2010 01:39
#!/usr/bin/python
WhatThisIS="""
This is a hacked together script to connect to all of your running EC2 instances, and to provide a single SSH prompt amongst all of them, and to assist in uploading, splitting, and downloading files. email me at winniningham at and email server called gmail.com :P
"""
import paramiko
from numpy import *