Skip to content

Instantly share code, notes, and snippets.

View PaulTaykalo's full-sized avatar

Paul Taykalo PaulTaykalo

View GitHub Profile
@PaulTaykalo
PaulTaykalo / POodfile
Created August 27, 2015 15:35
Setting Up Nasty Macroses for some Pods :)
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
if target.name == "LogEntries"
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'LE_DEBUG_LOGS=0']
end
end
end
end
@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" }
{
"name": "ReactiveCocoa",
"version": "2.4.1",
"summary": "A framework for composing and transforming streams of values.",
"homepage": "https://github.com/blog/1107-reactivecocoa-is-now-open-source",
"authors": {
"Josh Abernathy": "josh@github.com"
},
"source": {
"git": "https://github.com/ReactiveCocoa/ReactiveCocoa.git",
license = <<EOT
Developer's use of the SDK is governed by the license in the applicable Flurry Terms of Service. Some components of the SDK are governed by open source software licenses. In the event of any conflict between the license in the applicable Flurry Terms of Service and the applicable open source license, the terms of the open source license shall prevail with respect to those components.
EOT
Pod::Spec.new do |s|
s.name = 'FlurrySDK'
s.version = '6.4.0'
s.license = { :type => 'Commercial', :text => license }
s.summary = 'FlurrySDK for analytics tracking and reporting. Also Ads included'
s.homepage = 'http://www.flurry.com'
@PaulTaykalo
PaulTaykalo / updateForInjection
Created June 2, 2015 10:14
Update for inection mehtod for ComponentKit
#import <ComponentKit/CKComponentScopeRoot.h>
#import <ComponentKit/CKComponentViewInterface.h>
@implementation FrostedQuoteComponent(Private)
- (void)updateOnClassInjection {
dispatch_async(dispatch_get_main_queue(), ^{
id comp = self;
while (comp) {
comp = [comp nextResponder];
[
{ "problemId": 0,
"seed": 0,
"tag": "tag",
"solution": "a"
}
]
@PaulTaykalo
PaulTaykalo / nm-usage.examle
Created August 19, 2015 18:55
nm -o example
./test/fixtures/objc-with-spaces/ObjC_With_Spaces-cuxhtkyoxskzaicbcbeydsfpwwsp/Build/Intermediates/ObjC With Spaces.build/Debug-iphonesimulator/ObjC With Spaces.build/Objects-normal/x86_64/AppDelegate.o: 0000000000000230 t -[AppDelegate .cxx_destruct]
./test/fixtures/objc-with-spaces/ObjC_With_Spaces-cuxhtkyoxskzaicbcbeydsfpwwsp/Build/Intermediates/ObjC With Spaces.build/Debug-iphonesimulator/ObjC With Spaces.build/Objects-normal/x86_64/AppDelegate.o: 0000000000000000 t -[AppDelegate application:didFinishLaunchingWithOptions:]
./test/fixtures/objc-with-spaces/ObjC_With_Spaces-cuxhtkyoxskzaicbcbeydsfpwwsp/Build/Intermediates/ObjC With Spaces.build/Debug-iphonesimulator/ObjC With Spaces.build/Objects-normal/x86_64/AppDelegate.o: 0000000000000150 t -[AppDelegate applicationDidBecomeActive:]
./test/fixtures/objc-with-spaces/ObjC_With_Spaces-cuxhtkyoxskzaicbcbeydsfpwwsp/Build/Intermediates/ObjC With Spaces.build/Debug-iphonesimulator/ObjC With Spaces.build/Objects-normal/x86_64/AppDelegate.o: 00000000000000d0 t -[
@PaulTaykalo
PaulTaykalo / dwarfdump-full.example
Created August 19, 2015 19:12
Dwarfdump example
----------------------------------------------------------------------
File: ./test/fixtures/objc-with-spaces/ObjC_With_Spaces-cuxhtkyoxskzaicbcbeydsfpwwsp/Build/Intermediates/ObjC With Spaces.build/Debug-iphonesimulator/ObjC With Spaces.build/Objects-normal/x86_64/AppDelegate.o (x86_64)
----------------------------------------------------------------------
.debug_info contents:
0x00000000: Compile Unit: length = 0x00004551 version = 0x0002 abbr_offset = 0x00000000 addr_size = 0x08 (next CU at 0x00004555)
0x0000000b: TAG_compile_unit [1] *
AT_producer( "Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)" )
AT_language( DW_LANG_ObjC )