Skip to content

Instantly share code, notes, and snippets.

View chrismiles's full-sized avatar

Chris Miles chrismiles

View GitHub Profile
@chrismiles
chrismiles / reveal.py
Last active September 2, 2021 00:26
Lazy script to wrap Reveal lib load/start commands in one LLDB command.
""" File: reveal.py
Add to ~/.lldbinit:
command script import ~/.lldb-scripts/reveal.py
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode?
A: In Xcode:
Add a Symbolic Breakpoint
Symbol: "UIApplicationMain"
Action: Debugger Command with value "reveal"
echo "HD Video Download"
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*dl=1">HD' | sed -e 's/\?dl=1">HD//g' | xargs -n1 wget -N
echo "PDFs Download"
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*.pdf' | sed -e 's/\?dl=1">PDF//g' | xargs -n1 wget -N
@chrismiles
chrismiles / cggradient.swift
Created August 7, 2014 12:02
Core Graphics gradient drawing with Swift? No problem.
let colorSpace = CGColorSpaceCreateDeviceRGB()
let componentCount : UInt = 4
let components : [CGFloat] = [
0, 0, 0, 0,
1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
0, 0, 0, 0
]

Keybase proof

I hereby claim:

  • I am chrismiles on github.
  • I am chrismiles (https://keybase.io/chrismiles) on keybase.
  • I have a public key whose fingerprint is 830F F4A6 3613 7F3F 87DA C42D CE2B 7306 7333 35C2

To claim this, I am signing this object:

@chrismiles
chrismiles / gist:8bbdbb74fab79b290298
Created November 3, 2014 06:19
discoveryd_kick.sh
#!/bin/sh
set -x
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sleep 10
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist