Skip to content

Instantly share code, notes, and snippets.

View tchon's full-sized avatar

Timothy Chon tchon

View GitHub Profile
@tchon
tchon / annoying.js
Created June 1, 2011 21:09 — forked from rwaldron/annoying.js
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@tchon
tchon / getscreenshot.py
Created May 11, 2011 18:07 — forked from bellbind/getscreenshot.py
[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/
@tchon
tchon / getscreenshot.py
Created May 11, 2011 18:07 — forked from bellbind/getscreenshot.py
[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/
@tchon
tchon / webkitscreenshot.py
Created May 11, 2011 18:07 — forked from bellbind/webkitscreenshot.py
[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")