This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL MTDIsBoldTextEnabled(void) { | |
static BOOL boldTextEnabled = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// Hack that checks if the "bold text" flag in the accessibility settings is enabled | |
UIFont *font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; | |
boldTextEnabled = [font.fontName rangeOfString:@"MediumP4"].location != NSNotFound; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// | |
// Fonts | |
"font_face": "Monaco", | |
"font_options":"subpixel_antialias", | |
"font_size": 11.0, | |
"bold_folder_labels":true, | |
"line_padding_bottom":1, | |
"line_padding_top":1, | |
"word_separators": "./\\()\"'-:,.;<>~!@$%^&*|+=[]{}`~?", // Remove '#' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" File: reveal.py | |
Add to ~/.lldbinit: | |
command script import ~/.lldb-scripts/reveal.py | |
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode? | |
A: In Xcode: | |
Add a Symbolic Breakpoint | |
Symbol: "UIApplicationMain" | |
Action: Debugger Command with value "reveal" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSArray*)allEntriesInContext:(NSManagedObjectContext*)context fromDate:(NSDate*)fromDate toDate:(NSDate*)toDate{ | |
// Create the request | |
NSFetchRequest *request = [[NSFetchRequest alloc]initWithEntityName:@"Entry"]; | |
// Build the predicate | |
NSPredicate *predicate = [NSPredicate predicateWithFormat: @"date >= %@ && date <= %@ ", fromDate, toDate]; | |
request.predicate = predicate; | |
// Define sorting | |
NSSortDescriptor *sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]; | |
request.sortDescriptors = @[sortDesc]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Key sections of code for this implementation are placed below | |
@interface JSTableWithFixedHeaderViewController () | |
@property (strong, nonatomic) UIView *fixedHeaderView; | |
@end | |
@implementation JSTableWithFixedHeaderViewController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSOperationQueue+Completion.h | |
// QueueTest | |
// | |
// Created by Artem Stepanenko on 23.11.13. | |
// Copyright (c) 2013 Artem Stepanenko. All rights reserved. | |
// | |
typedef void (^NSOperationQueueCompletion) (void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
=begin | |
DEPENDENCIES: | |
$ brew install ffmpeg | |
$ brew install imagemagick | |
=end | |
require 'optparse' | |
require 'fileutils' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSPredicate+Distinct.h | |
// | |
// Created by Maurizio Cremaschi on 11/11/2013. | |
// Copyright (c) 2013 Myfleek Ltd. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSPredicate (Distinct) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PX = require('com.pixate.framework'); | |
PX.styleSheetFromFilePathWithOrigin({ | |
monitor: true, | |
origin: 0, | |
filename: '/path/to/file.css' | |
}); | |
PX.styleSheetFromFilePathWithOrigin({ | |
monitor: true, | |
origin: 0, | |
filename: '/path/to/second_file.css' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SHRZebraView.h | |
// Shares | |
// | |
// Created by Sam Soffes on 9/19/13. | |
// Copyright (c) 2013 Nothing Magical. All rights reserved. | |
// | |
@interface SHRZebraView : UIView | |
@end |