This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
- <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="2"> | |
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12C60" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="2"> | |
<dependencies> | |
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/> | |
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/> | |
</dependencies> |
This file contains hidden or 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
// | |
// WJLSideBySideToAnaglyphFilter.h | |
// | |
// Copyright (c) 2013 William LaFrance | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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
// | |
// NSObject+Switch.h | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSObject (Switch) | |
- (void)switch:(NSDictionary *)cases default:(void (^)(id obj))defaultBlock; |
This file contains hidden or 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
Fri Apr 12 19:16:32 2013 | |
panic(cpu 2 caller 0xffffff800dab7e95): Kernel trap at 0xffffff800daa3742, type 14=page fault, registers: | |
CR0: 0x0000000080010033, CR2: 0x0000000020000038, CR3: 0x000000005073302e, CR4: 0x00000000000606e0 | |
RAX: 0x0000000000000000, RBX: 0xffffff8027b9d5a0, RCX: 0x0000000000000000, RDX: 0x0000000020000000 | |
RSP: 0xffffff81de883450, RBP: 0xffffff81de8834a0, RSI: 0x0000000000000040, RDI: 0x000000000018952d | |
R8: 0xffffff804ca9a258, R9: 0x0000000000002000, R10: 0x0000000000000000, R11: 0x0000000105111000 | |
R12: 0xffffff81de883770, R13: 0xffffff804ca9a200, R14: 0x00000001717d7000, R15: 0xffffffffffffffbf | |
RFL: 0x0000000000010246, RIP: 0xffffff800daa3742, CS: 0x0000000000000008, SS: 0x0000000000000000 | |
Fault CR2: 0x0000000020000038, Error code: 0x0000000000000000, Fault CPU: 0x2 |
This file contains hidden or 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
int i = 0; | |
id turtle = sender; | |
do { | |
turtle = [turtle superview]; | |
NSLog(@"turtle %d: %@", i++, turtle); | |
} while (turtle != nil); | |
NSLog(@"reached the bottom turtle"); |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
void heapTest() { | |
int heapsize = 1024 * 1024; // 1MB | |
uint8_t *data = malloc(heapsize); | |
for (int i = 0; i < heapsize; i++) { | |
if (data[i] != 0) { | |
printf("unclean heap\n"); |
This file contains hidden or 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
git diff `git log -n1 --skip 1 | grep commit | awk '{print $2}'` HEAD > patch.txt |
This file contains hidden or 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
; $ nasm -f macho rng.asm && ld -macosx_version_min 10.7 -e _main -lc -o rng rng.o && ./rng | |
BITS 32 | |
%define sys_exit 1 | |
%define EXIT_SUCCESS 0 | |
; ---------------------------------------- | |
section .text |
This file contains hidden or 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
/** | |
* Creates a dispatch_once style singleton. | |
* | |
* SINGLETON(NSString *awesomeString) | |
* awesomeString = [NSString stringWithFormat:@"%@ %@", @"composed", @"string"]; | |
* SINGLETON_END(awesomeString) | |
*/ | |
#define SINGLETON(name) static name; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ | |
#define SINGLETON_END(name) }); return name; |
This file contains hidden or 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
[02:14:32] [lafrance@defiant ~]$ traceroute 8.8.8.8 | |
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets | |
1 10.0.1.1 (10.0.1.1) 1.562 ms 1.041 ms 0.851 ms | |
2 10.135.192.1 (10.135.192.1) 8.983 ms 11.382 ms 7.915 ms | |
3 dtr01ftbgwi-tge-0-6-0-3.ftbg.wi.charter.com (96.34.25.58) 7.827 ms 9.392 ms 9.210 ms | |
4 crr01ftbgwi-bue-4.ftbg.wi.charter.com (96.34.18.108) 15.835 ms 18.028 ms 11.863 ms | |
5 crr01euclwi-bue-1.eucl.wi.charter.com (96.34.16.77) 15.964 ms 23.221 ms 25.005 ms | |
6 bbr01euclwi-bue-4.eucl.wi.charter.com (96.34.2.4) 26.253 ms 15.519 ms 15.766 ms | |
7 bbr02euclwi-bue-5.eucl.wi.charter.com (96.34.0.7) 19.720 ms 17.853 ms 17.133 ms | |
8 bbr01chcgil-bue-1.chcg.il.charter.com (96.34.0.9) 28.908 ms 27.110 ms 23.751 ms |