Skip to content

Instantly share code, notes, and snippets.

View kevinslin's full-sized avatar

Kevin Lin kevinslin

View GitHub Profile
@kevinslin
kevinslin / gist:1490982
Created December 17, 2011 18:27
Simple Fibonacci finder
#python, #elegant, #example
def fib(n):
" Generate fib sequence up to n "
a, b = 0, 1
while (b < n):
print b
a, b = b, a + b
@kevinslin
kevinslin / Click
Created October 20, 2011 18:27
Simulate a click using javacsript
function simulatedClick(target, options) {
var event = target.ownerDocument.createEvent('MouseEvents'),
options = options || {};
//Set your default options to the right of ||
var opts = {
type: options.click || 'click',
canBubble:options.canBubble || true,
cancelable:options.cancelable || true,
@kevinslin
kevinslin / gist:1260863
Created October 4, 2011 03:50
Change Timezone in Unix System
sudo dpkg-reconfigure tzdata
rm(list=ls())