aly / ddnsupdate.py
0 likes
0 forks
1 files
Last active
Script to update a DDNS provider (currently namecheap, but any provider that offers a simple http interface should work if the url is replaced) with your current IP
| 1 | import requests,time,socket,json,sys |
| 2 | |
| 3 | def init_settings(): |
| 4 | try: |
| 5 | with open("settings.json") as f: |
| 6 | settings = json.load(f) |
| 7 | return settings |
| 8 | except: |
| 9 | with open("settings.json", "w") as f: |
| 10 | settings = dict(domain="REPLACE_WITH_DOMAIN", |
aly / apache_mirror.py
0 likes
0 forks
2 files
Last active
Script to mirror a directory visible over apache directory indexing. Creates a batch file containing urls and directory output locations
| 1 | #!/usr/bin/env python2 |
| 2 | # Usage: ./apache_mirror.py [BASE URL] [NUMBER OF COLUMNS] |
| 3 | # If the target site has more (or less) than three columns in the directory index, the second parameter is required. |
| 4 | |
| 5 | import sys |
| 6 | import urllib2 |
| 7 | from bs4 import BeautifulSoup as Soup |
| 8 | |
| 9 | def do_iterate(curdir="", BASE="", COL="", fh=None): |
| 10 | print "Entering {}".format(BASE + curdir) |
aly / gpstrack.php
0 likes
0 forks
1 files
Last active
Google Maps display for a csv-formatted list of dates/latitudes/longitudes/accuracy-in-metres.
| 1 | <?php |
| 2 | |
| 3 | $passwdfile = "/path/to/file"; |
| 4 | $logpath = "/path/to/file"; // should be a csv file with date,lat,long,hor-acc |
| 5 | |
| 6 | // For json |
| 7 | foreach (apache_request_headers() as $header => $value) { if ($header == "Accept") { $accept = $value; } } |
| 8 | |
| 9 | // Variable checks |
| 10 | $allowed = isset($_GET['allowed']); |
aly / gistfile1.md
0 likes
0 forks
1 files
Last active
(bookmarklet) Cheat at http://game.ioxapp.com/color/ (for people with bad eyesight or bad screens)
javascript:(function%20()%20{prev="";var%20arr=[].slice.call(document.getElementsByTagName('span')).slice(3);for(i=0;i<arr.length;i++){if(arr[i].style){if(prev!=arr[i].style["backgroundColor"]&&prev!=""){arr[i].style["backgroundColor"]%20=%20"rgb(255,%20255,%20255)";}else{prev%20=%20arr[i].style["backgroundColor"];}}}})()

aly / cahplayer.py
0 likes
0 forks
4 files
Last active
Autoplayer for RoyalDev's Cards Against Humanity IRC bot
| 1 | from twisted.internet import reactor, task, defer, protocol |
| 2 | from twisted.python import log |
| 3 | from twisted.words.protocols import irc |
| 4 | from twisted.application import internet, service |
| 5 | import yaml, sys, random, re |
| 6 | |
| 7 | with open(sys.argv[1] if len(sys.argv) > 1 else 'config.yml') as f: |
| 8 | config = yaml.load(f.read()) |
| 9 | HOST, PORT = config['host'], config['port'] |
aly / tpparse.py
0 likes
0 forks
1 files
Last active
Transperth offline bus stop data and example implementation
| 1 | # Data can be retrieved (gzipped) from |
| 2 | # https://mega.co.nz/#!os4gjQBR!fspHcvoHZHDzN6IGtJgIXUh4N_ciIEL40tHoivqcKXg |
| 3 | # Currently this data only contains info for weekdays, as of 2014-06-20. I can't make the data |
| 4 | # collection process public, sadly, so please email me if you'd like saturday or sunday/holiday data. |
| 5 | # |
| 6 | # This is an example implementation of a program to read this data, in Python |
| 7 | # It replicates Transperth's service to look up the next five bus times to a stop, as seen here |
| 8 | # http://136213.mobi/Bus/StopResults.aspx?SN=14353 |
| 9 | # Please direct questions to steven+transperthdata@blha303.com.au |
| 10 | # |
aly / mediaserverindex.html
0 likes
0 forks
1 files
Last active
A drop-in media server index for apache that uses directory indexing and adds a HTML5 video player. loads directory changes with ajax
| 1 | <html> |
| 2 | <head> |
| 3 | <script src="jquery.js"></script> |
| 4 | </head> |
| 5 | <body> |
| 6 | <span id="VideoList"></span> |
| 7 | <script> |
| 8 | var videosPath = "/Videos/"; |
| 9 | var curdir = ""; |
| 10 | function updateList(data) { |