Skip to content

Instantly share code, notes, and snippets.

View scelis's full-sized avatar

Sebastian Celis scelis

View GitHub Profile
@scelis
scelis / UIFont+CustomizedDynamicType.m
Created April 14, 2021 12:23 — forked from jverkoey/UIFont+CustomizedDynamicType.m
Dynamic Type system fonts with custom point sizes, weight, and italics
static const CGFloat kFontWeightEpsilon = FLT_EPSILON;
@implementation UIFont (CustomizedDynamicType)
+ (nonnull UIFont *)preferredFontWithDefaultSize:(CGFloat)size
textStyle:(nonnull UIFontTextStyle)textStyle {
return [self preferredFontWithDefaultSize:size
textStyle:textStyle
fontWeight:UIFontWeightRegular
italic:NO];
//
// 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 (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:

#!/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
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;
//
// 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 / 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]
#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
@interface Restaurant : NSObject
+ (Restaurant)restaurant;
@end
+ (MySingleton *)sharedSingleton
{
static dispatch_once_t pred;
static MySingleton *instance = nil;
dispatch_once(&pred, ^{ instance = [[self alloc] init]; });
return instance;
}