Skip to content

Instantly share code, notes, and snippets.

Max Lansing lansing

Block or report user

Report or block lansing

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bright.py
#!/usr/bin/env python3
import subprocess
import sys
import re
from subprocess import Popen, PIPE, STDOUT
FILENAME = "/tmp/last_bright"
INC_ABS = 6
View gist:930317
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 Apr 20, 2011
got this stacktrack when lift crashed
View lift crash
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 ()
View gist:16
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;
You can’t perform that action at this time.