Skip to content

Instantly share code, notes, and snippets.

View PaulTaykalo's full-sized avatar

Paul Taykalo PaulTaykalo

View GitHub Profile
@PaulTaykalo
PaulTaykalo / Regex replace
Created September 28, 2012 07:44
This puts NSLog at start of each function in the class
// This puts NSLog at start of each function in the class
FROM:
(^[-\+][^\{]+)\{
TO:
$1\{NSLog(@"%s->%@",__FUNCTION__,@"Called");
Pod::Spec.new do |s|
s.name = 'Nimbus'
s.version = '0.9.3'
s.license = 'Apache License, Version 2.0'
s.summary = 'An iOS framework whose growth is bounded by O(documentation).'
s.homepage = 'http://docs.nimbuskit.info/index.html'
s.author = { 'Jeff Verkoeyen' => 'jverkoey@gmail.com',
'Bubnov Slavik' => 'bubnovslavik@gmail.com',
'Roger Chapman' => 'rogchap@gmail.com',
'Manu Cornet' => 'manu.cornet@gmail.com',
@PaulTaykalo
PaulTaykalo / FMDB.podspec
Created October 25, 2012 10:29
FMDB updated podSpec
Pod::Spec.new do |s|
s.name = 'FMDB'
s.version = '2.0'
s.summary = 'A Cocoa / Objective-C wrapper around SQLite.'
s.homepage = 'https://github.com/ccgus/fmdb'
s.license = 'MIT'
s.author = { 'August Mueller' => 'gus@flyingmeat.com' }
s.source = { :git => 'https://github.com/ccgus/fmdb.git',
:commit => '3d7eaf67bee4bd8ca2d62fd1a83f3db711d504f3' }
s.requires_arc = true
@PaulTaykalo
PaulTaykalo / dyci.spec
Created November 10, 2012 17:32
Temporary DYCI POD
Pod::Spec.new do |s|
s.name = "dyci"
s.version = "0.0.3.10232012"
s.summary = "Dynamic code injection tool. Allows to inject code at runtime."
s.homepage = "https://github.com/DyCI/dyci-main"
s.license = 'MIT'
s.author = { "Paul Taykalo" => "tt.kilew@gmail.com" }
@PaulTaykalo
PaulTaykalo / gist:4133008
Created November 22, 2012 21:33
JSON -> Objective-C Properties (Simple)
#1 Dates first
Replace :
(\w+):\s*"\d+-\d+.*
with
@property(nonatomic, strong) NSDate * $1;
#2 Strings after that
Replace :
(\w+):\s*".*
with
NSMutableSet * set = [NSMutableSet set];
[@[] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:[MyClass class]]) {
[set addObject:obj];
}
}];
@PaulTaykalo
PaulTaykalo / RakeFile
Created January 22, 2013 12:25
Cedar RakeFile
PROJECT_NAME = "CedarExample"
CONFIGURATION = "Release"
WORKSPACE_NAME = "CedarExample"
SCHEME_NAME = "CedarExampleTests"
SPECS_TARGET_NAME = "CedarExampleTests"
SDK_VERSION = "6.0"
@PaulTaykalo
PaulTaykalo / gist:9829954
Last active August 29, 2015 13:57
What's the problem with this code?

Method

- (id)initFromKey:(NSString*)key {
    NSString* path = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Caches/%@", key]];

    @try
    {
        self = [NSKeyedUnarchiver unarchiveObjectWithFile:path];
    }
 @catch (NSException * e)
Pod::Spec.new do |s|
s.name = 'Nimbus'
s.version = '1.0.2'
s.license = 'Apache License, Version 2.0'
s.summary = 'An iOS framework whose growth is bounded by O(documentation).'
s.homepage = 'http://docs.nimbuskit.info/index.html'
s.author = { 'Jeff Verkoeyen' => 'jverkoey@gmail.com',
'Bubnov Slavik' => 'bubnovslavik@gmail.com',
'Roger Chapman' => 'rogchap@gmail.com',
'Manu Cornet' => 'manu.cornet@gmail.com',
Pod::Spec.new do |s|
s.name = "KeepLayout"
s.version = "1.3.0"
s.summary = "Making Auto Layout easier to code."
s.homepage = "https://github.com/iMartinKiss/KeepLayout"
s.license = { :type => 'MIT', :file => 'LICENSE.md' }
s.author = 'Martin Kiss'
s.source = { :git => "https://github.com/iMartinKiss/KeepLayout.git", :commit => "9641ab993c8261ce7b10ae3c42f8c173c853ef7c" }