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
import re | |
import sys | |
ex = re.compile("\"(url|referer)\"\:\"(.*)\"") | |
with open(sys.argv[1]) as f: | |
for line in iter(f.readline,""): | |
m = ex.search(line) | |
print(m.group(2)) |
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 re | |
import sys | |
from functools import partial | |
remainder = "" | |
bufsize=4096 | |
ex = re.compile('"(?:url|referer)"\:"([^"]*)"') | |
with open(sys.argv[1]) as f: |
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/python | |
import socket | |
from threading import Thread | |
from Queue import Queue, Empty | |
class ClientSender(Thread): | |
def __init__(self, sock, queue): | |
super(ClientSender, self).__init__() | |
self.socket = sock | |
self.queue = queue |
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
# -*- coding: utf-8 -*- | |
# iTC Sales Report Downloader | |
# When you run this for the first time, you'll need to enter your | |
# iTunes Connect login and vendor ID. You can find the vendor ID | |
# on the iTunes Connect website by navigating to "Sales and Trends"; | |
# it's the number next to your name (top-left). | |
CURRENCY = 'EUR' | |
RESET_LOGIN = False # Set to True to remove login from keychain |
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
import socket, ssl, json, struct | |
import binascii | |
# device token returned when the iPhone application | |
# registers to receive alerts | |
deviceToken = '39cac56f 986a0e66 3c4fd4f4 68df5598 024d2ca3 8b9f307c 741c180e 9fc30c62' | |
thePayLoad = { | |
'aps': { | |
'alert':'Oh no! Server\'s Down!', |
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 os | |
import re | |
import logging | |
import fnmatch | |
try: | |
# For Python 3.0 and later | |
from urllib.request import urlopen | |
except ImportError: | |
# Fall back to Python 2's urllib2 |
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 re | |
import os | |
import urllib | |
import httplib | |
import logging | |
import pyinotify | |
from threading import Thread, Event | |
from socket import gethostname | |
#from logging.handlers import SysLogHandler |
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 json | |
import sys | |
import datetime | |
import os.path | |
with open(sys.argv[1]) as f: | |
data = json.load(f) |
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/perl -w | |
use strict; | |
my $BLOCK_SIZE=1024; | |
my $fname = $ARGV[0]; | |
open(F,"<$fname") or die("Unable to open file $fname, $!"); | |
binmode(F); | |
my $buf; |
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
Updating, please wait. | |
+++++++++++++++++++++++++++++++ | |
Now updating OctoPrint to 1.3.2 | |
+++++++++++++++++++++++++++++++ | |
/home/pi/oprint/bin/python "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py" --branch= --force=false "/home/pi/OctoPrint" 1.3.2 | |
'build/scripts-2.7' does not exist -- can't clean it | |
Python executable: '/home/pi/oprint/bin/python' | |
>>> Running: git diff --shortstat | |
> git diff --shortstat |