usage:
node index.js <some tumblr blog url>
usage:
node index.js <some tumblr blog url>
| import sys, re | |
| f = open(sys.argv[1]) | |
| files = f.read().split('-- --------------------------------------------------------') | |
| files.pop(0) | |
| for file in files: | |
| table = re.search('-- .*\`(.*)\`\n--', file).group(1) #Get table name | |
| f = open('./' + table + '.sql', 'w') | |
| f.write(file) |
| #!/usr/bin/env python | |
| import os, json | |
| from BaseHTTPServer import HTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| from subprocess import * | |
| def callCommand(comm): | |
| return check_output(comm+"; exit 0", stderr=STDOUT, shell=True) |
| # Change GIF nº animation loop count | |
| # Usage: python script.py "path-to-image" <number> | |
| # | |
| # Number: 0 to infinite loop. Enter other number to set that loop count | |
| import sys, re; | |
| import binascii; | |
| pattern = "\x4E\x45\x54\x53\x43\x41\x50\x45\x32\x2E\x30"; | |
| regex = re.compile(pattern); |