Skip to content

Instantly share code, notes, and snippets.

View JimRoepcke's full-sized avatar

Jim Roepcke JimRoepcke

View GitHub Profile
@JimRoepcke
JimRoepcke / gist:3065296
Created July 7, 2012 07:46
@synchronized doesn't retain monitored object under MRC
__block id foo = [MyObject new];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSLog(@"block entering synchronized");
@synchronized(foo) {
NSLog(@"running in synchronized");
sleep(10);
NSLog(@"running [foo self]");
[foo self];
NSLog(@"ran [foo self]");
}
@JimRoepcke
JimRoepcke / gist:3016633
Created June 29, 2012 08:21
My chat with MobileMe Express Lane support about iCloud Mail and iPhone 3G
Chat Transcript
Friday, June 29, 2012 12:41 AM
Duration: 19 minutes 56 seconds
Shante:
Hi, welcome to Apple! My name is Shante with MobileMe support. Please give me a moment to look over the information you provided.
Shante:
I understand that you would like to confirm that you can move your accounts in any order that you want to and once the accounts are moved to iCloud they will be individual accounts?
@JimRoepcke
JimRoepcke / gist:918268
Created April 13, 2011 19:50
Make an Automator service that receives text with a Run Applescript command
-- select @"foo", activate this service
-- @"foo" is replaced with kFoo and
-- the clipboard contains the variable
-- declaration for your .h/.m files
-- http://discussions.apple.com/message.jspa?messageID=2900758
on getString(testChar, theString, searchList, replaceList)
set {oldDelims, AppleScript's text item delimiters} to ¬
{AppleScript's text item delimiters, {testChar}}
set charOffset to (length of (text item 1 of searchList)) + 1
@JimRoepcke
JimRoepcke / gist:732885
Created December 8, 2010 04:31
Program received signal: “EXC_BAD_ACCESS”. (gdb) p/x $eax $1 = 0xfe15980
Happens while randomly scrolling a table view in the simulator. Both alloc and free are not in my code. Is this a bug in Apple's code or am I missing something?
ALLOC 0xfe15980-0xfe15997 [size=24]: thread_a001a500 |start | main | UIApplicationMain | GSEventRun | GSEventRunModal | CFRunLoopRunInMode | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSource1 | __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ | mshMIGPerform | _XCopyParameterizedAttributeValue | _AXXMIGCopyParameterizedAttributeValue | _copyParameterizedAttributeValueCallback | _createAXUIElementsFromUIElements | _appendVendedAXElementsFromUIElements | _addAXElementsToArrayFromObject | _appendChildrenToArrayStartingAtIndex | -[UITableViewCellAccessibilityElement isAccessibilityElement] | -[UITableViewCellAccessibilityElement tableViewCell] | -[UITableViewCellAccessibility(SafeCategory) _accessibilityReuseChildren:forMockParent:] | -[UITableViewCellAccessibility(SafeCategory) _accessibilityInternalData] | -[_AXTableViewCellInternal