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
# REPLACE YOUR FKEY value. You need to load a stack site, view the source, Ctrl-F and find your fkey, then put it into the command line as argv[1]. | |
# so run it as python miner.py <your fkey> | |
# It also relies on Google Chrome's cookie lib to find the auth cookies. | |
import requests | |
import sqlite3 | |
import os | |
from urlparse import urlparse |
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
# fattener.py | |
import sys | |
import os | |
import envoy | |
import json | |
resolved = {} | |
def resolve_dependencies(gem_name): |
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 | |
##### You will need the CISCO-CONFIG-COPY-MIB File from ftp://ftp.cisco.com/pub/mibs/v2/CISCO-CONFIG-COPY-MIB.my ##### | |
##### You will also need to set the value of TFTP_IP | |
export MIBDIRS=~/mibs | |
echo $MIBDIRS | |
export MIBS=CISCO-CONFIG-COPY-MIB | |
export IPADDR=$1 | |
export HOSTNAME=$2 | |
export COMMUNITY=$3 |
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
#applications/mod_abstraction | |
#applications/mod_avmd | |
#applications/mod_blacklist | |
#applications/mod_callcenter | |
#applications/mod_cidlookup | |
#applications/mod_cluechoo | |
applications/mod_commands | |
applications/mod_conference | |
#applications/mod_curl | |
applications/mod_db |
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
// ==UserScript== | |
// @name t.co securifier | |
// @version 0.2 | |
// @description replace t.co link with https variant | |
// @match https://twitter.com/* | |
// @copyright 2013, Tom O'Connor | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function addJQuery(callback) { | |
var script = document.createElement("script"); |
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
URL="http://tomoconnor.eu" | |
HTTP_STATUS=$(curl -o /dev/null -s -if --write-out "%{http_code}\n" $URL) | |
if [ $HTTP_STATUS -ne 200 ]; then `which false`; else `which true`; 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
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
This, of course, completely screws up Django templates, | |
because Django thinks {{ and }} mean something. | |
Wrap {% verbatim %} and {% endverbatim %} around those | |
blocks of jQuery templates and this will try its best |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
exec {"/usr/bin/pip install lxml": | |
unless => "python -c import lxml", | |
require => Package['python-pip'], | |
} |
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
#wdaemon upstart script | |
description "Wdaemon for Wacom" | |
start on runlevel [2345] | |
respawn | |
expect fork | |
pre-start exec modprobe uinput | |
exec /usr/local/bin/wdaemon -s -c /etc/wdaemon.conf -f |