Skip to content

Instantly share code, notes, and snippets.

View lansing's full-sized avatar

Max Lansing lansing

View GitHub Profile
#!/usr/bin/env python3
import subprocess
import sys
import re
from subprocess import Popen, PIPE, STDOUT
FILENAME = "/tmp/last_bright"
INC_ABS = 6
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07-334-10M3326)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02-334, mixed mode)
@lansing
lansing / lift crash
Created April 20, 2011 03:27
got this stacktrack when lift crashed
java(222,0x11a762000) malloc: *** error for object 0x115fe8ef0: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
Breakpoint 1, 0x00007fff83f65779 in malloc_error_break ()
(gdb) bt
#0 0x00007fff83f65779 in malloc_error_break ()
#1 0x00007fff83f668d0 in szone_error ()
#2 0x00007fff83e90040 in szone_free_definite_size ()
#3 0x00000001000ee701 in VerifyClassForMajorVersion ()
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIInterfaceOrientationLandscapeRight || orientation == UIInterfaceOrientationLandscapeLeft ) {
NSLog(@"Landscape");
self.pageWidth = size.width;
self.pageHeight = size.height;
}
else {
NSLog(@"Portrait");
self.pageWidth = size.height;
self.pageHeight = size.width;