Skip to content

Instantly share code, notes, and snippets.

@rikhul
rikhul / perf_stats.js
Created September 10, 2012 19:24
phantomJS script to collect some stats of projectplace
/*
produces performance statistics of loading projectplace.com as a json structure
*/
var page = require('webpage').create(),
system = require("system");
if (system.args.length != 3) {
console.log('Usage: perf_stats.js user password');
phantom.exit(1);
@rikhul
rikhul / gist:2911746
Created June 11, 2012 18:22
Skyline python puzzle
from operator import itemgetter
def pathOf(skyline):
"Produces the path along the skyline"
if not skyline:
return []
path = [1,skyline[0]]
for x_coord in range(1,len(skyline)):
last_height = path[-1]
@rikhul
rikhul / Foo.java
Created April 15, 2012 07:59
Test of ofy and task queue
package com.example.OfyAndQueues.server;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
@Entity
public class Foo {
@Id public Long id;
public int bar = 0;
}