This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Selenium WebDriver - Browser Benchmark | |
run 10 iterations of simple local test case with each driver: | |
Firefox (webdriver) vs. Chrome (chromedriver) vs. PhantomJS (ghostdriver). | |
""" | |
import unittest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import struct | |
def get_image_info(data): | |
if is_png(data): | |
w, h = struct.unpack('>LL', data[16:24]) | |
width = int(w) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Corey Goldberg, 2013 | |
# | |
# Python 2.7 | |
"""validate and analyze dimensions of image files. Supports: PNG, JPG, GIF.""" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tox] | |
envlist = | |
py26 | |
py27 | |
[testenv] | |
deps = | |
nose | |
commands = | |
{envpython} setup.py install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Example using `concurrencytest`: | |
# https://github.com/cgoldberg/concurrencytest | |
import time | |
import unittest | |
from concurrencytest import ConcurrentTestSuite, fork_for_tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Example using `concurrencytest`: | |
# https://github.com/cgoldberg/concurrencytest | |
import unittest | |
from concurrencytest import ConcurrentTestSuite, fork_for_tests | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install bzr and gource | |
# get a branch of Mir's trunk code | |
# create gource video | |
$ sudo apt-get install bzr gource | |
$ bzr branch lp:mir | |
$ cd mir | |
$ gource \ | |
-s .06 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Corey Goldberg, 2013 | |
import argparse | |
import pkgtools.pypi | |
""" | |
Command line script to lookup packages on Python Package Index (PyPI). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Launch XBMC in windowed mode, then use wmctrl to remove the titlebar | |
# Select display 1 | |
DISPLAY=:0.0 | |
# Start XBMC without blocking this script | |
xbmc & | |
# Wait for the XBMC window to appear |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hamburger bash shell-prompt! | |
http://boingboing.net/2013/04/03/howto-turn-your-shell-prompt-i.html | |
to do this on Ubuntu: | |
- open terminal: | |
- $ sudo apt-get install ttf-ancient-fonts | |
- $ export PS1="\\u@\h \\w 🍔 " |