Skip to content

Instantly share code, notes, and snippets.

View scelis's full-sized avatar

Sebastian Celis scelis

View GitHub Profile

Keybase proof

I hereby claim:

  • I am scelis on github.
  • I am scelis (https://keybase.io/scelis) on keybase.
  • I have a public key whose fingerprint is 57F9 3313 8704 A915 DE95 0475 D8A2 3129 3CD8 305C

To claim this, I am signing this object:

//
// Copyright (c) 2014 Tony Arnold & The CocoaBots. All rights reserved.
import Foundation
extension NSFileManager
{
class func applicationSupportDirectoryURL() -> NSURL?
{
@scelis
scelis / SCAppUtils.h
Created December 21, 2009 18:11
Add a background image to your UINavigationBar.
#import <UIKit/UIKit.h>
#define kSCNavigationBarBackgroundImageTag 6183746
#define kSCNavigationBarTintColor [UIColor colorWithRed:0.54 green:0.18 blue:0.03 alpha:1.0]
@interface SCAppUtils : NSObject
{
}
+ (void)customizeNavigationController:(UINavigationController *)navController;
@scelis
scelis / gist:335253
Created March 17, 2010 14:00
Retrieve a list of all fonts available on the iPhone.
NSArray *familyNames = [UIFont familyNames];
for (NSString *familyName in familyNames)
{
NSLog(@"Family: %@\n", familyName);
NSArray *fontNames = [UIFont fontNamesForFamilyName:familyName];
for (NSString *fontName in fontNames)
{
NSLog(@"\tFont: %@\n", fontName);
}
}
+ (MySingleton *)sharedSingleton
{
static dispatch_once_t pred;
static MySingleton *instance = nil;
dispatch_once(&pred, ^{ instance = [[self alloc] init]; });
return instance;
}
@interface Restaurant : NSObject
+ (Restaurant)restaurant;
@end
#ifdef MOLocalizationTable
#define MOLocalizedString(key, default) \
[[NSBundle mainBundle] localizedStringForKey:(key) value:(default) table:MOLocalizationTable]
#else
#define MOLocalizedString(key, default) \
[[NSBundle mainBundle] localizedStringForKey:(key) value:(default) table:nil]
#endif
@scelis
scelis / gist:2062990
Created March 17, 2012 17:20
Instapaper 4.1 Crash Log (Scroll to Top)
Incident Identifier: D4A44777-0457-4E22-852B-9984CA14A740
CrashReporter Key: c4fa1c6f9ab63f0dc21c1ad60d842dcd1ff27ea2
Hardware Model: iPad3,1
Process: InstapaperPro [869]
Path: /var/mobile/Applications/7295E22C-20ED-44BA-9950-F6E8147B6A4A/InstapaperPro.app/InstapaperPro
Identifier: InstapaperPro
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
//
// SCTimingViewController.m
// iOSTester
//
// Created by Sebastian Celis on 8/6/12.
//
#import <mach/mach.h>
#import <mach/mach_time.h>
#import "SCTimingViewController.h"
@scelis
scelis / UIButton+MOBlockCallbacks.h
Last active December 17, 2015 13:59
Adding block callback functionality to UIButton.
#import <UIKit/UIKit.h>
typedef void (^MOButtonCallback)(id sender);
@interface UIButton (MOBlockCallbacks)
// Adds a block callback for a set of UIControlEvents. This method returns an opaque token which
// can be used to remove the callback.
- (id)mo_addCallback:(MOButtonCallback)callback forControlEvents:(UIControlEvents)events;