Skip to content

Instantly share code, notes, and snippets.

View issess's full-sized avatar

SeungHoon Han issess

View GitHub Profile
@gwwar
gwwar / KoreSampl.js
Created March 23, 2012 03:05
A simple helper that returns a list of elements at a given point using elementFromPoint
/**
* @author Kerry Liu
* WTFPL
**/
;(function(){
//test for ie: turn on conditional comments
var jscript/*@cc_on=@_jscript_version@*/;
var styleProp = (jscript) ? "display" : "pointerEvents";
var KoreSampl = function() {};
@kkosuge
kkosuge / route53DynDNS.bash
Created March 2, 2012 19:58
Amazon Route 53 Dynamic DNS Updater Script
#!/bin/bash
### User Settings (things you must set)
## Location of the dnscurl.pl script
DNSCurl="/path/to/route53DynDNS/dnscurl.pl"
## The host name you wish to update/create
myHostName="*"
## Zone/domain in which host (will) reside(s)
myDomainName="example.com"
@shreeshga
shreeshga / gist:1627145
Created January 17, 2012 15:45
md5sum through brew
brew install md5sha1sum
@jay3sh
jay3sh / stack-trace-without-exception.js
Created August 20, 2011 10:33
print stack trace anywhere
function foo(args) {
var i, j, k;
// ...
// j acquires some interesting value
// Who called foo when j took this interesting value?
//
var e = new Error('dummy');
var stack = e.stack.replace(/^[^\(]+?[\n$]/gm, '')
.replace(/^\s+at\s+/gm, '')
@gennad
gennad / BFSDFS.java
Created January 23, 2011 09:14
Breadth-first search and depth-first search Java implementation
Class Main {
public void bfs()
{
// BFS uses Queue data structure
Queue queue = new LinkedList();
queue.add(this.rootNode);
printNode(this.rootNode);
rootNode.visited = true;
while(!queue.isEmpty()) {
Node node = (Node)queue.remove();