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 | |
# usage: | |
# | |
# wget https://customer-webtools-api.internode.on.net/unmetered_ip_address_list.txt | |
# ./node-to-acl < unmetered_ip_address_list.txt | |
import sys | |
import ipaddr | |
try: |
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 | |
import cgi | |
import cgitb | |
import mysql.connector | |
DB_HOST = 'localhost' | |
DB_DATABASE = '' | |
DB_USER = '' | |
DB_PASS = '' |
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
""" VT100 control code wrappers | |
Example usage: | |
import vt100 | |
print vt100.blue('the sky').red(' is red').reset() | |
""" | |
RESET_TERMINAL = '\033c' |
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
# file: /etc/cron.d/speedtest | |
* * * * * root /usr/local/bin/speedtest 2>/dev/null >>/var/log/speedtest.log |
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 python3 | |
import sys | |
import time | |
import requests | |
from urllib.parse import urljoin | |
class HLSPipe: | |
""" HLSPipe — HTTP Live Streaming Pipe |
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 | |
""" Atmail 4 to Atmail 7.1 migration | |
Copyright (C) 2013 Ace Internet Services Pty Ltd | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. |
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 | |
set -e -x | |
export LC_ALL=C | |
sudo apt-get update | |
sudo apt-get -y install devscripts git dpatch | |
git clone git://github.com/dotwaffle/rancid-git |
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
### Keybase proof | |
I hereby claim: | |
* I am jeremyvisser on github. | |
* I am jeremyvisser (https://keybase.io/jeremyvisser) on keybase. | |
* I have a public key whose fingerprint is CFF4 E176 D294 DAED F603 3FE2 360F 8D38 A532 6F5B | |
To claim this, I am signing this object: |
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 python3 | |
""" Test Alex Bellos' method of winning a guessing game. | |
Take two random numbers, a and b. The objective is to | |
guess whether a is greater than or less than b. | |
You might think you have a 50% chance of guessing correctly, | |
which is true if guessed randomly. | |
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 | |
set -e -x | |
# required for dpkg to work | |
export PATH=/usr/bin:/usr/sbin:/bin:/sbin | |
cat >/etc/apt/sources.list <<EOF | |
deb http://ap-southeast-2.archive.ubuntu.com/ubuntu/ trusty main restricted multiverse universe | |
deb http://ap-southeast-2.archive.ubuntu.com/ubuntu/ trusty-updates main restricted multiverse universe |
OlderNewer