Skip to content

Instantly share code, notes, and snippets.

View jhoughjr's full-sized avatar
🎯
Focusing

Jimmy Hough Jr. jhoughjr

🎯
Focusing
View GitHub Profile
@jhoughjr
jhoughjr / foo
Created August 14, 2012 15:22
wtf
- (void) aButtonTapped:(id)sender
{
if (sender == _shareWithFacebookButton)
{
DLog(@"shareWithFaceBookButton tapped");
if (_facebookController == nil) {
[self setFacebookController:[[DBFacebookController alloc] init]];
@jhoughjr
jhoughjr / foo
Created October 30, 2012 05:55
a serial command interface with state tracking
// GardenGuard RC 1
// © 2012 Jimmy Hough for Emrys Engineering
// Rights are exclusively granted to Scoot Boldwyn to modify, redistribute or use this code in any way without written permission
// I minimize the use of locals to speed things up
// I try to minimize context switching so that execution is fastest
//
// the controller reads data from the serial port,
// parses it and responds accordingly
//
@jhoughjr
jhoughjr / gist:4562288
Last active December 11, 2015 06:49
this might be it lol.
[_elementPicker selectRow:[_elementsWithoutGraphLabels
indexOfObject:[self readSelectedUIElementName]]
inComponent:0
animated:YES];
@jhoughjr
jhoughjr / gist:4581804
Created January 20, 2013 21:09
not sure what i was thinking here. anhone care to guess what i was doing?
#pragma mark Setup
// Add shadows to graph labels
-(void) setupLayers{
// make some locals to elminate un needed meesaging and struct acceessing
const float theWidth = [self bounds].size.width;
const float theHeight = [self bounds].size.height;
const float theRadius = [[self circle] radius];
const CGRect axisLabelBounds = CGRectMake(0, 0, 15, 15);
// this is the convetion used in SmallTalk for messgaes with multiple arguments
// Brad Cox created Objective C to use SmallTlak messaging atop of C
// ps Alan Kay created SMallTalk, the first OOP language
[self postNotificationWithName:@"aName"
selector:@selector(foo:)
object:self
userInfo:dict];
@jhoughjr
jhoughjr / gist:4616530
Last active December 11, 2015 14:48
this seems slow
-(void) angleDidChange:(NSNotification*) notifcation
{
DLog(@"");
_timesAngleDidChangeWasCalled++;
////
const float theWidth = [self bounds].size.width;
Accessibility for iOS
Essentials
Accessibility for OS X
Essentials
Adopting Automatic Reference Counting
Developer Tools
Adopting OpenCL in Your Application
Graphics, Media & Games
Adopting Storyboards in Your App
Developer Tools
//
// PHColorSchemeElementDefines.h
// TrigPad
//
// Created by Jimmy Hough Jr on 1/25/13.
// Copyright (c) 2013 PH Systems. All rights reserved.
//
#ifndef TrigPad_PHColorSchemeElementDefines_h
#define TrigPad_PHColorSchemeElementDefines_h
@jhoughjr
jhoughjr / gist:4643570
Created January 26, 2013 18:09
my first singleton!
+(PHColorSchemeManager*) sharedInstance
{
static PHColorSchemeManager* theInstance = nil;
if (theInstance == nil) {
theInstance = [[[self class] alloc] init];
}
Ld /Users/jhough39/Library/Developer/Xcode/DerivedData/TrigPad-bmqvtxkdsweolrbgmptqritvmlqc/Build/Products/Debug-iphonesimulator/TrigPad.app/TrigPad normal i386
cd /Users/jhough39/github/local/TrigPad
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/jhough39/Library/Developer/Xcode/DerivedData/TrigPad-bmqvtxkdsweolrbgmptqritvmlqc/Build/Products/Debug-iphonesimulator -F/Users/jhough39/Library/Developer/Xcode/DerivedData/TrigPad-bmqvtxkdsweolrbgmptqritvmlqc/Build/Products/Debug-iphonesimulator -F/Users/jhough39/github/local/TrigPad -F/Applications/Xcode.app/Contents/Developer/Library/