Skip to content

Instantly share code, notes, and snippets.

View atomicbird's full-sized avatar

Tom Harrington atomicbird

View GitHub Profile
@atomicbird
atomicbird / NSObject+setValuesForKeysWithJSONDictionary.h
Created January 11, 2012 02:35
NSObject category for handling JSON dictionaries. Described in detail at http://www.cimgf.com/2012/01/11/handling-incoming-json-redux/
//
// NSObject+setValuesForKeysWithJSONDictionary.h
// SafeSetDemo
//
// Created by Tom Harrington on 12/29/11.
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
if (success)
{
short i;
i++;
}
#!/bin/bash
# Convert man pages to PDF and open them in the default PDF viewer.
# PDFs are cached when created.
# By Tom Harrington, tph at atomicbird dot com, 16 March 2005
# Directory to save cached PDFs in
# (if you don't want long-term caching, you could use /tmp/).
CACHEDIR=~/Library/Caches
- (void)loadView {
NSLog(@"!!@#$!@#$!@#$!@#$!@#$!@#$!@#$!@#$");
self.wantsFullScreenLayout = YES;
CGRect f = CGRectZero;
f = [UIScreen mainScreen].applicationFrame;
UIView *container = [[UIView alloc] initWithFrame:f];
Dear H--------
Sequel to your non response of my earlier letter to you
I am the Trustee and Executor to the Will of my late client
Mr Morris H--------, Who before his death deposited the sum
of Seventeen Million United States Dollars in a bank here
in Budapest, Hungary.
I have been unsuccessful in locating his relatives for over
three years and the Bank has instructed me to present his
self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"addsubapp+.png"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(doSomethingCool)]
autorelease];
Processes: 108 total, 11 running, 3 stuck, 94 sleeping, 460 threads 15:25:14
Load Avg: 18.75, 18.89, 16.93 CPU usage: 23.79% user, 76.20% sys, 0.0% idle
SharedLibs: 3040K resident, 8776K data, 0B linkedit.
MemRegions: 21237 total, 916M resident, 24M private, 316M shared.
PhysMem: 494M wired, 992M active, 465M inactive, 1951M used, 96M free.
VM: 246G vsize, 1042M framework vsize, 928980(118) pageins, 308376(0) pageouts.
Networks: packets: 5275551/3179M in, 5122821/3826M out.
Disks: 2100108/53G read, 3549472/35G written.
PID COMMAND %CPU TIME #TH #WQ #POR #MREG RPRVT RSHRD RSIZE
Mach Virtual Memory Statistics: (page size of 4096 bytes, cache hits 0%)
free active spec inactive wire faults copy 0fill reactive pageins pageout
1682 264972 3588 128968 59267 99747167 3980863 48903497 1262518 893491 289592
4969 263635 3392 127918 58546 3895 293 2002 0 71 3
4412 263712 3614 127890 58697 4435 160 3120 0 164 0
3266 263908 4186 128109 58815 3674 32 2993 0 112 0
1939 264895 3584 128793 59268 6196 6 5325 1 669 7
1808 264984 1846 130528 59430 6365 9 4864 0 17 1
4212 265206 1908 128209 58805 7527 449 3450 0 15 0
4549 265236 1915 128180 58708 5558 81 4712 0 0 0
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
opQ = [[NSOperationQueue alloc] init];
[[NSNotificationCenter defaultCenter] addObserverForName:@"CustomOperationCompleted"
object:nil queue:opQ
usingBlock:^(NSNotification *notif) {
NSNumber *theNum = [notif.userInfo objectForKey:@"NumberOfItemsProcessed"];
NSLog(@"Number of items processed: %i", [theNum intValue]);
}];
}
kern.ostype = Darwin
kern.osrelease = 10.3.1
kern.osrevision = 199506
kern.version = Darwin Kernel Version 10.3.1: Mon Mar 15 23:15:33 PDT 2010; root:xnu-1504.2.27~18/RELEASE_ARM_S5L8930X
kern.maxvnodes = 750
kern.maxproc = 52
kern.maxfiles = 12288
kern.argmax = 262144
kern.securelevel = 0
kern.hostname = [redacted]