Skip to content

Instantly share code, notes, and snippets.

@pudquick
pudquick / xcode_get.py
Last active December 7, 2020 09:01
Stupid tricks: using stock macOS python subprocess with curl to download products from Apple's Developer Center
from subprocess import Popen, PIPE, STDOUT, check_output
from mimetools import Message
from StringIO import StringIO
from urlparse import urlparse, parse_qs
from urllib import quote, basejoin, urlencode
DEV_SITE = 'https://developer.apple.com'
AUTH_SITE = 'https://idmsa.apple.com'
AUTH_PATH = '/IDMSWebAuth/authenticate'
APPIDKEY_PATH = "/services-account/download?path=%s"
@oilbeater
oilbeater / python
Last active February 28, 2018 11:55
python
// use shell command
import subprocess
output = subprocess.check_output('dir', shell=True)
print(output)
@dansimau
dansimau / ldif-to-csv.sh
Created November 12, 2010 15:14
Shell script that reads LDIF data from STDIN and outputs as CSV.
#!/bin/bash
#
# Converts LDIF data to CSV.
# Doesn't handle comments very well. Use -LLL with ldapsearch to remove them.
#
# 2010-03-07
# [email protected]
#
# Show usage if we don't have the right params