Skip to content

Instantly share code, notes, and snippets.

@kennyyu
kennyyu / edit.sh
Created September 20, 2013 15:56
edit N random files
#!/bin/bash
if [ -z "$1" ]
then
echo "usage: $0 N"
exit 1
fi
N=$1
files=$(find /home/passifist/linux-2.4.29 | grep "\.[ch]")
// Taken from: http://theclearingband.com/tumblr/tagcloud2.js
var postcount = 0;
var postmax = 400;
var posttotal = 0;
var tmap = new Object();
var tvals = new Object();
var vstr = "";
var tdiv = document.getElementById("tagcloud");
tdiv.innerHTML = "Loading cloud...";
@kennyyu
kennyyu / count.py
Created June 12, 2014 20:10
script to count the number of lines written by an author in a git repository
import argparse
import json
import os
import subprocess
class Chdir:
"""
Initializer/destructor pattern for cd taken from here:
http://stackoverflow.com/questions/431684/how-do-i-cd-in-python
"""
@kennyyu
kennyyu / .gitignore
Created February 2, 2014 04:38
cs161 gitignore file
build/*
build
defs.mk
kern/compile/*
*.swp
.depend
# ignore eclipse metadata files
.cproject
.project