Skip to content

Instantly share code, notes, and snippets.

@aufflick
aufflick / reveal.py
Last active January 1, 2016 04:18 — forked from chrismiles/reveal.py
""" 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"
@aufflick
aufflick / appledoc-styles.css
Created October 1, 2013 05:28
Appledoc css
body {
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
font-size: 13px;
}
code {
font-family: Courier, Consolas, monospace;
font-size: 13px;
color: #666;
}
@aufflick
aufflick / config.json
Created September 10, 2013 06:36
test
{
"showSplash": true,
"showSplashDelay": 2
}
@aufflick
aufflick / update_version.pl
Last active December 22, 2015 06:38
My version of the bundle version incrementing script
use strict;
use warnings;
if ($ENV{CONFIGURATION} =~ /^Release/)
{
my $plist = "$ENV{PROJECT_DIR}/$ENV{INFOPLIST_FILE}";
my $build_number = `/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $plist`;
chomp $build_number;
@aufflick
aufflick / idevelopertv_download.pl
Last active December 19, 2015 13:59
Download all your ideveloper.tv videos
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use LWP::UserAgent;
use Mozilla::CA;
if (@ARGV != 2 || $ARGV[0] !~ /@/) {
#import <Foundation/NSObject.h>
@interface Fraction: NSObject {
int numerator;
int denominator;
}
-(void) print;
-(void) setNumerator: (int) n;
-(void) setDenominator: (int) d;
@aufflick
aufflick / XSynthesizeCoders.h
Last active December 16, 2015 10:09
X Macro goodness for removing duplication in NSCoder implementations
typedef void (^XDecodeBlock)(id x);
typedef id (^XEncodeBlock)(void);
// posing a CLLocationCoordinate2D as a CGPoint because of a bug in NSValue valueWithMKCoordinate...
static XEncodeBlock XCLLocationCoordinate2DEncoder(CLLocationCoordinate2D loc)
{
return ^{
return [NSValue valueWithCGPoint:CGPointMake(loc.latitude, loc.longitude)];
};
}
@aufflick
aufflick / truncating_proxy.pl
Created April 16, 2013 15:01
Simulate the AT&T network
use strict;
use warnings;
use HTTP::Proxy;
use HTTP::Proxy::BodyFilter::simple;
use HTTP::Proxy::BodyFilter::complete;
my $proxy = HTTP::Proxy->new( port => 8123 );
$proxy->push_filter(
$ ./hello deploy heroku --appname ***
Please enter your Heroku credentials
(Sign up for free at https://api.heroku.com/signup)
Email: ***
Password: ***
Collecting all files in /Users/aufflick/src/misc/hello_app ... (Ctrl-C to cancel)
Adding file Makefile.PL
Adding file Perloku
@aufflick
aufflick / gist:4472199
Last active December 10, 2015 18:08
This is Google's cache of http://www.mpfr.org/mpfr-current/allpatches. It is a snapshot of the page as it appeared on 14 Dec 2012 19:37:52 GMT.
diff -Naurd mpfr-3.1.1-a/PATCHES mpfr-3.1.1-b/PATCHES
--- mpfr-3.1.1-a/PATCHES 2012-08-30 09:28:51.000000000 +0000
+++ mpfr-3.1.1-b/PATCHES 2012-08-30 09:28:51.000000000 +0000
@@ -0,0 +1 @@
+get_decimal64
diff -Naurd mpfr-3.1.1-a/VERSION mpfr-3.1.1-b/VERSION
--- mpfr-3.1.1-a/VERSION 2012-07-03 15:01:13.000000000 +0000
+++ mpfr-3.1.1-b/VERSION 2012-08-30 09:28:51.000000000 +0000
@@ -1 +1 @@
-3.1.1