Skip to content

Instantly share code, notes, and snippets.

Michael Lynn pudquick

Block or report user

Report or block pudquick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View YoutubeDL.py
import urllib2, urlparse, sys, webbrowser
itags = {'45': 'webm_720p',
'44': 'webm_480p',
'43': 'webm_360p',
'38': 'mp4_3072p',
'37': 'mp4_1080p',
'36': 'phone_mp4_240p',
'35': 'flv_480p',
'34': 'flv_360p',
View Reader Version
import urllib2, json
opener = urllib2.build_opener()
opener.addheaders = [('x-requested-with', 'XMLHttpRequest')]
adobe_info = json.loads(opener.open('http://get.adobe.com/reader/webservices/json/standalone/?platform_type=Macintosh&platform_dist=OSX&platform_arch=x86-32&platform_misc=10.8.0&language=English&eventname=readerotherversions').read())
View Latest Mac JRE 7
import urllib2, re
html_src = urllib2.urlopen('http://java.com/en/download/manual.jsp?locale=en').read()
dmg_link = re.search('<a title="[ ]*Download Java software for Mac OS X" href="(http://javadl.sun.com/webapps/download/AutoDL\?BundleId=[0-9]+)">', html_src).group(1)
View mac_boards.json
{
"iMac,1": {
"part-number": ["M6709LL/A", "M7345LL/A", "M7440LL/A"],
"emc-number": ["None"],
"board-id": [],
"model-number": ["M4984"]
},
"Macmini5,3": {
"part-number": ["MC936LL/A"],
"emc-number": ["2442"],
View SoundcloudDL.py
import requests, random, datetime, sys, webbrowser, console
def main():
song_page = None
if (len(sys.argv) > 0):
try:
song_page = sys.argv[1]
except Exception:
song_page = None
if not song_page:
View gist:5422111
typemap = [(["FUNC"], funcdef, []), (["PROC"], procdef, []), (varTypes, vardef, [sym[1]])]
for typeset, typefunc, typearg in typemap:
if sym[0] in typeset:
nextsym()
typefunc(*([defScope] + typearg))
break
else: error("type specifier")
View version_check.py
import re, urllib2, json, webbrowser, console, SimpleHTTPServer, SocketServer, sys
html_template = """
<html><head><title>Updates</title>
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<style media="all">
::-webkit-scrollbar { width: 1px; }
html { width: 100%%; height: 100%%; margin: 0; padding: 0; }
body {
font: normal normal normal 13px/1.5 'Helvetica Neue',Arial,Helvetica,sans-serif;
View MegaDL.py
import os.path, sys, os, SimpleHTTPServer, SocketServer, clipboard, webbrowser, shutil, zipfile, console
__mega_acct__ = 'yourname@example.com'
__mega_pass__ = 'passwordhere'
def _unzip(a_zip=None, path='.', altpath='unzipped'):
if a_zip is None:
return
filename = os.path.abspath(a_zip)
if not os.path.isfile(filename):
View gsDL.py
import re, hashlib, uuid, json, random, os, urllib2, os.path, time, sys, SimpleHTTPServer, SocketServer, string, console, webbrowser, shutil, zipfile
class SmarterHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
server_version = 'SimpleHTTP/0.6'
file_name = ''
def do_GET(self):
if self.path.startswith('/transfer'):
self.get_transfer()
else:
f = self.send_head()
View gist:6160049
>>> testurl = CFURL('/Users/mike/Desktop/TestProfile.icc')
>>> str(testurl)
'file://localhost/Users/mike/Desktop/TestProfile.icc'
>>> profile_url = _ColorSync.ColorSyncProfileCreateWithURL(testurl._obj, 0)
>>> profile_url
140291789769856
You can’t perform that action at this time.