A Tool to easily backup Wordpress posts to your local filesystem.
I use this together with local-blog to host a local copy of my own blog on my laptop (for use on the road etc.).
#!/usr/bin/env python2 | |
""" | |
Other Repositories of python-ping | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
* https://github.com/l4m3rx/python-ping supports Python2 and Python3 | |
* https://bitbucket.org/delroth/python-ping |
import time | |
import random | |
import struct | |
import select | |
import socket | |
def chk(data): | |
x = sum(x << 8 if i % 2 else x for i, x in enumerate(data)) & 0xFFFFFFFF | |
x = (x >> 16) + (x & 0xFFFF) |
# This is some butt ugly fuckery that basically chdirs to the | |
# directory that is parent to this source file, imports the | |
# test subject from the main script, then de-imports (not really | |
# cause Python doesn't support that) the stuff that it needed to | |
# do that as not to pollute the name space and cause tests to | |
# possibly fail because of that. | |
# | |
# In order for this to work it's imperative that you: | |
# - Have the main script on the parent directory to the one | |
# this script file is in. |
from os import urandom | |
from base64 import b64encode | |
from string import ascii_letters, digits | |
def randkey(size=6, altchars=b'+.', ambiguous=b'IlO9GUS'): | |
key = '' | |
while len(key) < size: | |
chunk = b64encode(urandom(size*2), altchars) | |
key += str(bytes([c for c in chunk if c not in ambiguous]), encoding='utf-8') |
#!/usr/bin/env python | |
""" | |
Tool to download conference information from Indico | |
""" | |
import json, argparse, sys, re, logging, os, importlib | |
logger = logging.getLogger(__name__) | |
logging.basicConfig(format='%(levelname)s: %(message)s') |
#!/usr/bin/env python | |
import pickle | |
import argparse | |
import sys | |
def main(): | |
parser = argparse.ArgumentParser(description='Convert between pickle protocol versions.') | |
parser.add_argument('input_file') | |
parser.add_argument('output_file') |
# coding=utf-8 | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Written on 2013-02-04 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
Check <https://gist.github.com/4707775> for newer versions. | |
Uses dnspython: install with `pip install dnspython3` | |
""" |
#!/usr/bin/env python2.7 | |
# Matt's DNS management tool | |
# Manage DNS using DDNS features | |
# | |
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/ | |
# | |
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com. | |
# -h HELP! | |
# -s the server | |
# -k the key |
A Tool to easily backup Wordpress posts to your local filesystem.
I use this together with local-blog to host a local copy of my own blog on my laptop (for use on the road etc.).