Skip to content

Instantly share code, notes, and snippets.

View tchon's full-sized avatar

Timothy Chon tchon

View GitHub Profile
@didi0613
didi0613 / switch-to-oss-app-archeype.md
Last active November 14, 2018 21:37
Switch to OSS app archetype

Switch to OSS app archetype

Changes Required

  • Update your dependencies inside package.json

    Switch internal app archetype

    @walmart/electrode-archetype-react-app
    @walmart/electrode-archetype-react-app-dev
    
@tristanwietsma
tristanwietsma / auth.go
Created May 15, 2014 04:15
Golang web server example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
@gmarik
gmarik / README.md
Created October 21, 2011 21:44
phantomjs qunit.js example

About

minimal example of using [phantomjs] with [qunit]

$ phantomjs run-qunit.js file://`pwd`/test.html
'waitFor()' finished in 200ms.
Tests completed in 21 milliseconds.
5 tests of 5 passed, 0 failed.

Installation

@ericelliott
ericelliott / args.js
Created June 24, 2011 08:05
Polymorphic functions and multiple dispatch in JavaScript
var args = [].slice.call(arguments, 0);
@jacobian
jacobian / unicorn-socketserver.py
Created October 7, 2009 13:45
A simple preforking echo server using SocketServer.
"""
Simple forking echo server built with Python's SocketServer library. A more
Pythonic version of http://gist.github.com/203520, which itself was inspired
by http://tomayko.com/writings/unicorn-is-unix.
"""
import os
import SocketServer
class EchoHandler(SocketServer.StreamRequestHandler):
@bellbind
bellbind / webkitscreenshot.py
Created July 3, 2009 13:52
[python][webkitgtk][PIL][X][tool] get web site thumbnail by webkit
#!/usr/bin/env python
"""
web page screenshot by webkit
command usage:
python webkitscreenshot.py test.html
library usage:
import webkitscreenshot
image = webkitscreenshot.screenshot_vfb("file://test.html")
@bellbind
bellbind / getscreenshot.py
Created June 29, 2009 15:50
[python][pywebkitgtk]Get web page screenshot
#
# Get web page screenshot
#
# usage:
# xvfb-run -s "-screen 0 1024x768x24" python getschreenshot.py test.html
#
# libs:
# - pygtk: http://www.pygtk.org/
# - pywebkitgtk(python-webkit): http://code.google.com/p/pywebkitgtk/
# - PIL: http://www.pythonware.com/products/pil/