Skip to content

Instantly share code, notes, and snippets.

View ahmattox's full-sized avatar
🍤

Anthony Mattox ahmattox

🍤
View GitHub Profile
@ahmattox
ahmattox / SharedObject.h
Created July 30, 2012 19:18
GCD Shared Instance
#import <Foundation/Foundation.h>
@interface SharedObject : NSObject
+ (SharedObject *) sharedInstance;
@end
//
// AnimatedView.h
//
// Created by Anthony Mattox on 6/18/12.
// Copyright (c) 2012 Friends of The Web. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ParticleView : UIView {
#!/bin/sh
# addDebugSettingsChild.sh
#
# Simple script to inject a Debug menu in an iPhone Settings plist.
#
# created 10.15.2008 by Andy Mroczkowski, mrox.net
THIS="`basename $0`"
PLISTBUDDY="/usr/libexec/PlistBuddy -x"
@ahmattox
ahmattox / script.js
Created May 22, 2012 15:49
Smooth scroll all links with internal anchors.
$(document).ready(function() {
$('a[href^="#"]').click(function(event) {
$('body').animate({
'scrollTop': $($(this).attr('href')).position().top - 20
}, 300);
event.preventDefault();
return false;
});
});
@ahmattox
ahmattox / TouchThroughView.h
Created March 6, 2012 14:13
UIViewSubclass which lets touches pass through it but not it's subviews.
//
// TouchThroughView.h
// Created by Anthony Mattox on 3/5/12.
//
#import <UIKit/UIKit.h>
@interface TouchThroughView : UIView
@property (nonatomic) BOOL touchThrough;
@ahmattox
ahmattox / NSObjectDescription.m
Created March 6, 2012 14:08
Extend Description for NSObject Subclasses
- (NSString *)description {
return [NSString stringWithFormat:@"<%@: %p; name = %@; location = (%f, %f)>", NSStringFromClass([self class]), self, name, loc.x, loc.y];
}