This file contains 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
import sys | |
import pexpect | |
def setpassword(read_write_password, read_only_password=None): | |
p = pexpect.spawn("vncpasswd") | |
# Uncomment the next line if you want to see the standard output | |
#p.logfile = sys.stdout | |
if read_write_password: | |
print ("Setting read-write password") |
This file contains 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
* Download and open Selenium RC from seleniumhq.org | |
* Download and install phpsh from phpsh.org | |
[terminal-1$ sudo ln -s /home/ubuntu/Apps/phpsh/phpsh /usr/local/bin/phpsh | |
* Start Selenium RC Server (in a new terminal window) | |
[terminal-2]$ cd /home/ubuntu/Apps/selenium-remote-control-1.0-beta-2/ | |
[terminal-2]$ cd selenium-server-1.0-beta-2/ | |
[terminal-2]$ java -jar selenium-server.jar | |
This file contains 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
"X is for..." | |
1. Xerces Blue (a type of butterfly.) (I think this is the coolest of the X words, by the way.) | |
2. Xenosaur ("slender-bodied Mexican lizards." Love any word that ends in "osaur".) (Thanks, @amyrhoda!) | |
3. Xiphias (genus for swordfish) | |
4. X marks the spot (on a treasure map) | |
5. Xenon (thanks @trybka!) | |
6. Xi'an (Home of the Terracotta Army. Sweet.) (Thanks, @gvwilson!) | |
7. X Prize (This /is/ rocket science.) | |
8. Railroad crossing sign. (It's a visual: http://www.roadtrafficsigns.com/Crossing-Sign/Railroad-Crossing-Sign/SKU-X-W10-1.aspx) |
This file contains 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
$ curl http://localhost:5984/_all_dbs | |
["db-1","db-2","db-3"] | |
$ curl -X DELETE http://localhost:5984/db-3 | |
{"ok":true} | |
$ curl http://localhost:5984/_all_dbs | |
["db-1","db-2"] |
This file contains 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
import boto | |
BUCKET = 'my-awesome-unique-bucket' | |
filepath = '/path/to/file/filename.zip' | |
conn = boto.connect_s3() | |
bucket = conn.lookup(BUCKET) | |
key = boto.s3.Key(bucket) | |
key.name = 'filename.zip' | |
key.set_contents_from_filename(filepath) |
This file contains 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
chipperfish:~ jasonhuggins$ sudo /Library/Frameworks/Python.framework/Versions/2.5/bin/easy_install Sphinx | |
Searching for Sphinx | |
Reading http://pypi.python.org/simple/Sphinx/ | |
Reading http://sphinx.pocoo.org/ | |
Best match: Sphinx 0.6.1 | |
Downloading http://pypi.python.org/packages/2.5/S/Sphinx/Sphinx-0.6.1-py2.5.egg#md5=97b2b41115ba6825e5a9908b43cdf518 | |
Processing Sphinx-0.6.1-py2.5.egg | |
creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Sphinx-0.6.1-py2.5.egg | |
Extracting Sphinx-0.6.1-py2.5.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages | |
Adding Sphinx 0.6.1 to easy-install.pth file |
This file contains 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
# Inspired by: http://kk.org/ct2/2007/09/my-life-countdown-1.php | |
# Life expectancy data: | |
# http://www.health.state.ny.us/health_care/medicaid/publications/docs/adm/06adm-5att8.pdf | |
$ python | |
>>> from datetime import date, timedelta | |
>>> birth_year = 1976 | |
>>> birth_date = date(1976,3,2) | |
>>> life_expectancy = 76.09 |
This file contains 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
Terminal #1: | |
$ cd ~/selenium | |
# Download Selenium 1.0.1... | |
# If you don't have 'wget' installed, download and unzip manually | |
$ wget --quiet http://release.seleniumhq.org/selenium-remote-control/1.0.1/selenium-remote-control-1.0.1-dist.zip | |
$ unzip -q selenium-remote-control-1.0.1-dist.zip | |
$ cd selenium-remote-control-1.0.1/selenium-server-1.0.1/ |
This file contains 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
# Environment: | |
# * Mac OS X: 10.4.11 | |
# * Firefox: 3.5.1 | |
# * Java: "1.5.0_19" (build 1.5.0_19-b02-306) | |
# * Ruby: 1.8.6 (2007-03-13 patchlevel 0) [universal-darwin8.0] | |
# * Selenium RC: 1.0.1 | |
# * selenium-client gem: 1.2.16 | |
# Terminal #1: | |
# ------------ |
This file contains 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
1. Scribd, 539 Bryant St, Ste 200 | |
2. Engine Yard, 500 3rd St., 5th Floor | |
3. Sauce Labs, 500 3rd St., 2nd Floor | |
4. SocialCast, 19 South Park St. | |
5. Plato's Forms, 300 Brannan St., Ste. 404 | |
6. Shop It To Me, 340 Brannan St. | |
7. BigTent, 350 Brannan St. | |
8. Justin.tv, 36 Clyde St. | |
9. ZenDesk, 410 Townsend St. | |
10. Yammer, 410 Townsend St. |