Skip to content

Instantly share code, notes, and snippets.

View florianbachmann's full-sized avatar
💭
rock n roll

Flori florianbachmann

💭
rock n roll
View GitHub Profile
@florianbachmann
florianbachmann / SNRRestorationManager.h
Created September 3, 2012 11:03 — forked from indragiek/SNRRestorationManager.h
Simple Cocoa state restoration
//
// SNRRestorationManager.h
// Sonora
//
// Created by Indragie Karunaratne on 2012-08-19.
//
#import <Foundation/Foundation.h>
@protocol SNRRestorableState <NSObject>
@florianbachmann
florianbachmann / UIView+FrameAdditions.h
Created August 22, 2012 16:21 — forked from nfarina/UIView+FrameAdditions.h
UIView Frame helper getter/setter category methods
#import <UIKit/UIKit.h>
@interface UIView (SMFrameAdditions)
@property (nonatomic, assign) CGPoint $origin;
@property (nonatomic, assign) CGSize $size;
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect
@end
@florianbachmann
florianbachmann / SNRDiscogsEngine.h
Created August 20, 2012 06:36 — forked from indragiek/SNRDiscogsEngine.h
API wrapper for the Discogs API built on AFNetworking
//
// SNRDiscogsEngine.h
// Sonora
//
// Created by Indragie Karunaratne on 11-11-18.
//
#import <Foundation/Foundation.h>
@interface SNRDiscogsEngine : NSObject
@florianbachmann
florianbachmann / IPInsetLabel.h
Created July 14, 2012 08:10
IPInsetLabel: a simple UILabel subclass that adds padding insets and auto-height-resizing
//
// IPInsetLabel.h
// Instapaper
//
// Created by Marco Arment on 7/23/11.
// Copyright 2011 Instapaper LLC, released to the public domain.
//
#import <UIKit/UIKit.h>
#ifdef DEBUG
void pspdf_swizzle(Class c, SEL orig, SEL new) {
Method origMethod = class_getInstanceMethod(c, orig);
Method newMethod = class_getInstanceMethod(c, new);
if(class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) {
class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
}else {
method_exchangeImplementations(origMethod, newMethod);
}
//
// NSString+Cheddar.m
// Cheddar
//
// Created by Sam Soffes on 6/10/12.
// Copyright (c) 2012 Nothing Magical. All rights reserved.
//
#import "NSString+Cheddar.h"
# Uncrustify 0.59
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input
@florianbachmann
florianbachmann / LICENSE.txt
Created May 17, 2012 19:38 — forked from sindresorhus/LICENSE.txt
View source - view the generated source of a page (140byt.es)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@florianbachmann
florianbachmann / hack.sh
Created April 6, 2012 09:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
#import <Cocoa/Cocoa.h>