Skip to content

Instantly share code, notes, and snippets.


Sebastian Celis scelis

View GitHub Profile
scelis / UIFont+CustomizedDynamicType.m
Created Apr 14, 2021 — forked from jverkoey/UIFont+CustomizedDynamicType.m
Dynamic Type system fonts with custom point sizes, weight, and italics
View UIFont+CustomizedDynamicType.m
static const CGFloat kFontWeightEpsilon = FLT_EPSILON;
@implementation UIFont (CustomizedDynamicType)
+ (nonnull UIFont *)preferredFontWithDefaultSize:(CGFloat)size
textStyle:(nonnull UIFontTextStyle)textStyle {
return [self preferredFontWithDefaultSize:size
View NSFileManagerAdditions.swift
// Copyright (c) 2014 Tony Arnold & The CocoaBots. All rights reserved.
import Foundation
extension NSFileManager
class func applicationSupportDirectoryURL() -> NSURL?

Keybase proof

I hereby claim:

  • I am scelis on github.
  • I am 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:

View availability.rb
#!/usr/bin/env ruby
# This script can be used to check the in-store availability of the iPhone 5S.
# By default, it searches for all AT&T models. You can change this by editing
# the MY_DEVICES array below. While the Apple API supports searching for
# multiple devices at once, there is a limit.
# Once you have properly configured the MY_DEVICES array, you can run this script
# from the terminal. It takes a single parameter, which should be the zip code you
# wish to use for your search.
scelis / UIButton+MOBlockCallbacks.h
Last active Dec 17, 2015
Adding block callback functionality to UIButton.
View UIButton+MOBlockCallbacks.h
#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;
View SCRandomTimingViewController.m
// SCTimingViewController.m
// iOSTester
// Created by Sebastian Celis on 8/6/12.
#import <mach/mach.h>
#import <mach/mach_time.h>
#import "SCTimingViewController.h"
scelis / gist:2062990
Created Mar 17, 2012
Instapaper 4.1 Crash Log (Scroll to Top)
View gist:2062990
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/
Identifier: InstapaperPro
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
View gist:1935321
#ifdef MOLocalizationTable
#define MOLocalizedString(key, default) \
[[NSBundle mainBundle] localizedStringForKey:(key) value:(default) table:MOLocalizationTable]
#define MOLocalizedString(key, default) \
[[NSBundle mainBundle] localizedStringForKey:(key) value:(default) table:nil]
View Restaurant.h
@interface Restaurant : NSObject
+ (Restaurant)restaurant;
View gist:1185051
+ (MySingleton *)sharedSingleton
static dispatch_once_t pred;
static MySingleton *instance = nil;
dispatch_once(&pred, ^{ instance = [[self alloc] init]; });
return instance;