This file contains 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
// Resetting the application badge number | |
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; |
This file contains 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
// How to encode NSData for a HTTP request | |
NSString *dataString = [[NSString alloc] initWithFormat:@"%@", someData]; | |
NSString *dataEncoded = [dataString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | |
NSLog(@"Encoded data = %@", dataEncoded); |
This file contains 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
if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]) { | |
if ([error code] == NSPersistentStoreIncompatibleVersionHashError) { | |
NSLog(@"Persistent Store Incompatible Version error. Please check %@", storeUrl); | |
} else { | |
NSLog([error description]); | |
} | |
} |
This file contains 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
# Size of preview images for Safari's top sites / history | |
du -ch {~/Library/Caches/,`getconf DARWIN_USER_CACHE_DIR`}com.apple.Safari |
This file contains 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
# Fixing error code 133 | |
cd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/ | |
sudo mv IOKit IOKit.saved | |
sudo lipo IOKit.saved -extract_family i386 -output IOKit |
This file contains 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
-- OmniFocus to Pomodoro App for iPad | |
-- This script practically takes text that's on your clipboard | |
-- and generates a Pomodoro App for iPad compatible JSON file | |
-- for you to import in to the app (using Dropbox) | |
-- | |
-- I'm using it with OmniFocus, where copied tasks remain | |
-- on the clipboard as lines of text, basically. | |
-- If you're stuck on Things and this script is not working, | |
-- NOW might be a good time to switch. | |
-- |
This file contains 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
-- Things to Pomodoro App for iPad | |
-- This script asks Things for the currently selected todos | |
-- and generates a Pomodoro App for iPad compatible JSON file | |
-- for you to import in to the app (using Dropbox) | |
-- | |
-- Created by Thomas on 2011-02-17 | |
-- Inspired by Andreas on 2011-02-17 | |
-- | |
This file contains 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
[ | |
{ | |
"pomodoros": [ | |
], | |
"estimate": 4, | |
"list": 0, | |
"interruptions": [ | |
], | |
"subposition": -1, | |
"position": 184, |
This file contains 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
#!/bin/bash | |
# | |
# Show a growl notification every minute if battery is below threshold. | |
# | |
# Setup: | |
# 1. Install growlnotify | |
# 2. Adjust threshold in line 20 (here 656mAh) | |
# 3. Create line in crontab like this: | |
# * * * * * /path/to/script/battery_low.sh |
This file contains 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
require "rubygems" | |
require "json" | |
require "open-uri" | |
puts "API Token:" | |
api_token = gets.strip | |
puts "App ID:" | |
app_id = gets.strip |
OlderNewer