Skip to content

Instantly share code, notes, and snippets.

@jamessa
jamessa / gist:1255775
Created October 1, 2011 08:43
UserDefault Sample
/// Save Key
NSUserDefaults *userDefaults;
userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:api forKey:@"APIURLString"];
[userDefaults synchronize]; // save
// Get Key
function findDup(r){
var sheet = SpreadsheetApp.getActiveSheet();
var dataRange = sheet.getRange(r, 6);
var data = dataRange.getValues();
var target = data[0][0];
if ( target === "" ) {
return;
}
Logger.log(data.length);
Logger.log(target);
#pragma mark - Storyboard
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if( [segue.identifier isEqualToString:@"DeckPicker"]) {
UINavigationController *navigationController = segue.destinationViewController;
FCSettingsViewController *settings = (FCSettingsViewController*) [navigationController topViewController];
settings.delegate = self;
settings.selectedDeck = currentDeck;
}
}
/*
Welcome to Compass.
In this file you should write your main styles. (or centralize your imports)
Import this file using the following HTML or equivalent:
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
@import compass/reset
@import compass/css3
@import 960/grid
@jamessa
jamessa / gist:2593306
Created May 4, 2012 08:29
ImagePicker created a blocker for about 2 minutes.
May 4 16:20:48 unknown wammer-iOS[17563] <Warning>: -[WARemoteInterface(ScheduledDataRetrieval) beginPostponingDataRetrievalTimerFiring]
May 4 16:22:11 unknown wammer-iOS[17563] <Warning>: -[WARemoteInterface(ScheduledDataRetrieval) beginPostponingDataRetrievalTimerFiring]
May 4 16:23:57 unknown SpringBoard[52] <Warning>: Unable to cancel system wake for 2012-05-04 16:23:42 +0800. IOPMCancelScheduledPowerEvent() returned 0xe00002c2
May 4 16:23:57 unknown wifid[13] <Error>: WiFi:[357812637.413118]: Disable WoW requested by "spd"
May 4 16:23:57 unknown spd[17584] <Error>: spd:spd_vet_socket:658 getpeername failure for client socket [FD=4]: Socket is not connected
May 4 16:23:57 unknown spd[17584] <Error>: spd:spd_checkin_socket:954 Unable to check-in unsupported socket for client [PID=14514]
May 4 16:24:10 unknown SpringBoard[52] <Notice>: Posting 'com.apple.iokit.hid.displayStatus' notifyState=0
May 4 16:24:10 unknown SpringBoard[52] <Notice>: MultitouchHID: detection mode: 0->255
May 4 16:24:10 unkno
2012-05-29 18:29:07.609 wammer-iOS[496:4467] Removed file://localhost/var/mobile/Applications/B18D35FD-A13B-4477-9C03-DBEBAA2D014C/Library/Caches/IRWebAPIEngine/1338287343-A90273AA-25ED-45C2-AADD-D3D944D94B4B
2012-05-29 18:29:27.457 wammer-iOS[496:9f13] Removed file://localhost/var/mobile/Applications/B18D35FD-A13B-4477-9C03-DBEBAA2D014C/Library/Caches/IRWebAPIEngine/1338287351-D8AEDE58-F8DA-48BF-B74A-32390A23EBAC
2012-05-29 18:30:01.825 wammer-iOS[496:aa0b] Removed file://localhost/var/mobile/Applications/B18D35FD-A13B-4477-9C03-DBEBAA2D014C/Library/Caches/IRWebAPIEngine/1338287397-91D87C5D-04CE-4503-9F07-8F556C6D4E4E
2012-05-29 18:30:28.000 wammer-iOS[496:a94f] Removed file://localhost/var/mobile/Applications/B18D35FD-A13B-4477-9C03-DBEBAA2D014C/Library/Caches/IRWebAPIEngine/1338287410-7B78E3DF-D59F-4EED-9AC8-EA5D89A7476D
2012-05-29 18:30:28.801 wammer-iOS[496:707] *** Assertion failure in -[IRTableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-1914.85/UITableView.m:1037
2012-05-29 18:30:28.
/Applications/Adobe Photoshop CS6/Adobe Photoshop CS6.app/Contents/Resources> cat README.txt
This is a Intrinsic Images library, developed towards inclusion in Photoshop CS6.
- Please keep all the important design decisions documented in this file.
- The directory names must be lower case, due to Perforce related limitations.
Whereas the file names can be mixed case.
- Use cmake (2.8.4 current version) for building various library flavors until
actual tech transfer.
- Use boost library judiciously. Photoshop world does not like some aspects of
it. Libraries used by Intrinsics so far are - numerics
jsa at Mark-II-r4-4 in ~/Pictures/iPhoto Library
$ mdfind -onlyin . -name db
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Projects.db
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Projects.db-journal
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/iPhotoMain.db
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Database/apdb/Faces.db
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Database/apdb/SharingActivity.db
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Database/Faces/Detected/KtTdqEKTTcuHfQHKIcDBSQ.apdetected
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Database/Faces/Detected/0Abvnb3ySROv5n%BpDbjvQ.apdetected
/Volumes/Backpack/Heroes/jsa/Pictures/iPhoto Library/Database/Faces/Detected/IQ5nTYZVRYWIu+Db8pLeqg.apdetected
@jamessa
jamessa / gist:3713259
Created September 13, 2012 09:43
A sample of Jenkins configuration
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
2012-09-17 18:02:21.153 wammer-iOS[89427:c07] An instance 0x143f5090 of class WAArticleViewController_FullScreen_Photo was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
<NSKeyValueObservationInfo 0x1486cba0> (
<NSKeyValueObservance 0x1432fee0: Observer: 0x14334510, Key path: article.favorite, Options: <New: YES, Old: YES, Prior: NO> Context: 0x14334510, Property: 0x14334410>
)