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
#!/usr/bin/env python | |
# | |
# Only parameter is the user ID e.g. 12345678@N06, which comes | |
# from the last part of the URL pointing to your photostream. | |
# | |
import sys | |
import urllib2 | |
import flickrapi |
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
from base64 import b64encode, b64decode | |
def decode_key(key): | |
key, secret = key.split('|') | |
key = b64decode(key) | |
key = [ord(x) for x in key] | |
secret = b64decode(secret) | |
s = range(256) |
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
#!/bin/sh | |
# | |
# curl -k -L https://gist.github.com/ldx/5466020/raw/|sh | |
# - or - | |
# wget -O - https://gist.github.com/ldx/5466020/raw/|sh | |
# | |
ssh-keyscan github.com | |
TMPDIR=`mktemp -d /tmp/temp.XXXX` |
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
find_lib() { | |
_lib="$1" | |
_sysroot="$(gcc -print-sysroot)" | |
_gcc_searchdirs=$(gcc -print-search-dirs|grep '^libraries'|sed -e 's/^libraries: //g' -e 's/:/ /g' -e "s/=/\$sysroot/g") | |
_ld_searchdirs=$(ld --verbose|grep SEARCH_DIR|sed -e 's/SEARCH_DIR("//g' -e 's/");//g' -e "s/=/\$sysroot/g") | |
for d in $_gcc_searchdirs $_ld_searchdirs; do | |
if [ -f "$d/$_lib" ]; then | |
echo -n "$d/$_lib" | |
return | |
fi |
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
#!/bin/sh | |
# | |
# Build a chroot with a CentOS 6.5 base install. | |
# | |
CHROOT=/tmp/chroot | |
mkdir -p $CHROOT | |
mkdir -p $CHROOT/var/lib/rpm |
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
#!/bin/bash | |
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then | |
echo "This script can't run without your Sauce credentials" | |
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables" | |
echo "export SAUCE_USERNAME=ur-username" | |
echo "export SAUCE_ACCESS_KEY=ur-access-key" | |
exit 1 | |
fi | |
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)" |
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
#!/bin/sh | |
echo "All good." | |
exit 0 |
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 sqlite3 | |
conn = sqlite3.connect('sqlite.db') | |
cur = conn.cursor() | |
cur.execute("PRAGMA foreign_keys=OFF;") | |
cur.execute("BEGIN TRANSACTION;") | |
cur.execute("CREATE TABLE pictures (space_id INTEGER, display_id INTEGER);") | |
cur.execute("INSERT INTO pictures VALUES(NULL,NULL);") | |
cur.execute("INSERT INTO pictures VALUES(NULL,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
2015-01-06 12:45:15:507 - info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe) | |
2015-01-06 12:45:15:512 - info: Appium REST http interface listener started on 0.0.0.0:4443 | |
2015-01-06 12:45:15:518 - info: [debug] Non-default server args: {"port":4443,"callbackAddress":"127.0.0.1","backendRetries":4,"launchTimeout":"40000","logTimestamp":true,"logNoColors":true,"browserName":"safari","orientation":"portrait","showSimulatorLog":true,"keepKeyChains":true,"isolateSimDevice":true} | |
2015-01-06 12:45:15:519 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"} | |
2015-01-06 12:45:15:520 - info: Console LogLevel: debug | |
2015-01-06 12:45:16:092 - info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"iPhone Simulator","javascriptEnabled":true,"webdriver.remote.quietExceptions":true,"browserName":"safari","platformVersion":"8.1","platformName":"iOS"}} | |
2015-01-06 12:45:16:095 - info: Client User-Agent string: undefined | |
2015-01-06 12:45:16:096 - info: [debug] The |
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
2015-01-07 10:41:45:207 - info: Welcome to Appium v1.3.4 (REV 1c446f71b2759202b9677326c2a972b0b1377af9) | |
2015-01-07 10:41:45:211 - info: Appium REST http interface listener started on 0.0.0.0:4443 | |
2015-01-07 10:41:45:217 - info: [debug] Non-default server args: {"port":4443,"callbackAddress":"127.0.0.1","backendRetries":4,"launchTimeout":"40000","logTimestamp":true,"logNoColors":true,"browserName":"safari","orientation":"portrait","showSimulatorLog":true,"keepKeyChains":true,"isolateSimDevice":true} | |
2015-01-07 10:41:45:218 - warn: Deprecated server args: {"--show-sim-log":"use instead: --show-ios-log"} | |
2015-01-07 10:41:45:218 - info: Console LogLevel: debug | |
2015-01-07 10:41:45:671 - info: --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"iPhone Simulator","javascriptEnabled":true,"webdriver.remote.quietExceptions":true,"browserName":"safari","platformVersion":"8.1","platformName":"iOS"}} | |
2015-01-07 10:41:45:674 - info: Client User-Agent string: undefined | |
2015-01-07 10:41:45:675 - info: [debug] The |
OlderNewer