Skip to content

Instantly share code, notes, and snippets.

View justin's full-sized avatar

Justin Williams justin

View GitHub Profile
@justin
justin / gist:1255846
Created October 1, 2011 10:22
Debug Logging Description
In Elements can you go the Settings view -> Debugging and set "Debug Logging" to On. Now try to reproduce the error. When you do, please do the following.
1. Download the iPhone Configuration Utility for [Mac](http://support.apple.com/kb/DL851) or [Windows](http://support.apple.com/kb/DL926).
2. Run the installer. On a Mac, the iPhone Configuration Utility will be put in the Utilities folder in your Applications folder. On a Windows machine, it will be accessible in your Start menu.
3. Make sure your device is plugged into your computer.
4. Run the iPhone Configuration Utility. Your iOS device will appear in the source list (the blue-tinted left-most column), but it may take a few moments.
5. When it appears, click your device. You should find yourself looking at a tabbed view similar to the iPhone view in iTunes.
6. Click on the tab marked Console. You can safely ignore the other tabs, in fact, unless you're sure you know what you're doing, please do.
7. At the bottom right of the window, choose Save Cons
@justin
justin / NSTimer+Blocks
Created September 9, 2011 15:40
NSTimer+Blocks
typedef void (^SGBlock)();
@interface NSTimer (Blocks)
+ (id)scheduledTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)shouldRepeat block:(SGBlock)block;
+ (id)timerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)shouldRepeat block:(SGBlock)block;
@end
@justin
justin / justin.xml
Created March 13, 2011 16:17
Sample Characters RSS output that includes both updates and follow recommendations.
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns="http://backend.userland.com/rss2" xmlns:rss-foaf="http://rss-extensions.org/wiki/RSS-FOAF">
<channel>
<title>Justin Williams's Characters</title>
<link>http://carpeaqua.com/characters/justin.rss</link>
<description>An example of a simple RSS feed. This is the description of the feed itself, not an item.</description>
<!--
There are a set of RSS extensions on rss-extensions.org for FOAF.
http://rss-extensions.org/wiki/RSS-FOAF
@justin
justin / SGLocationManager.h
Created December 5, 2010 16:27
SGLocationManager's Meat
//
// SGLocationManager.h
// Second Gear Pitbox
//
// Created by Justin Williams on 12/5/10.
// Copyright 2010 Second Gear. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
QB - Peyton
RB - MJD
RB - Stephen Jackson
RB/WR - Sidney Rice
WR - Percy Harvin, WR
WR - Jerricho Cotchery, WR
Can you send me a copy of your data backup. You can do this by downloading the iPhone Backup Extractor from http://supercrazyawesome.com/
Here's a quick tutorial on how to use it:
(0) Sync the iPod/iPhone with iTunes
(1) Open iPhone Backup Extractor
(2) Click Read Backups
(3) Select from Device Name or Date where you want to retrieve your backup data and click "Choose." Get the most recent one obviously.
(4) Select the Elements application from the table view that lists your apps.
(5) Click Extract and select a folder where you want to extract the data in your computer (remember this location).
https://phobos.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=%fill:code%
-- This script places a page number in the bottom left corner of each page.
tell application "PDFpenPro"
if (count documents) > 0 then
set pageCount to count (pages of document 1)
repeat with pageNumber from 1 to pageCount
set thePage to page pageNumber of document 1
set theImprint to make new text imprint at end of imprints of thePage with properties {rich text:pageNumber as rich text, x position:36, y position:36, height:16, width:30}
set font of attribute run 1 of rich text of theImprint to "LucidaGrande-Bold"
tell application "PDFpenPro"
tell document 1
set theImprint to make new text field with properties {rich text:"Fez"} at end of imprints of page 1
set font of attribute run 1 of rich text of theImprint to "LucidaGrande-Bold"
set size of attribute run 1 of rich text of theImprint to 30
set color of theImprint to {1, 1, 1}
end tell
end tell
NSString *alertMessage = NSLocalizedString(@"Are you sure you want to sign out?", nil);
SGAlertView *alertView = [[SGAlertView alloc] initWithTitle:nil message:alertMessage];
[alertView addButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:^{}];
[alertView addButtonWithTitle:NSLocalizedString(@"Sign out", nil) block:^{
// Handle the sign out stuff
}];
[alertView show];
[alertView release];