Skip to content

Instantly share code, notes, and snippets.

Avatar
🙃

Leonardo CavalcanteLeo

🙃
View GitHub Profile
View Preferences.sublime-settings
{
"color_inactive_tabs": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"draw_indent_guides": false,
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
View UIView+Parallax.h
//
// UIView+Parallax.h
//
#import <Foundation/Foundation.h>
@interface UIView (Parallax)
-(void)addBackgroundParallax:(CGFloat)strength;
-(void)addForegroundParallax:(CGFloat)strength;
-(void)removeParallax;
@CavalcanteLeo
CavalcanteLeo / xcode-build-bump.sh
Created Jul 15, 2016 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
View xcode-build-bump.sh
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
View UIView+CustomTimingFunction.h
//
// UIView+CustomTimingFunction.h
// Instants
//
// Created by Christian Giordano on 16/10/2013.
// Copyright (c) 2013 Christian Giordano. All rights reserved.
//
#import <UIKit/UIKit.h>
@CavalcanteLeo
CavalcanteLeo / gist:83937e53d5bdf3ef1a6918de16d6a1c8
Created Jul 8, 2016 — forked from marsepu/gist:3854078
Triple DES encryption example using the CommonCrypto Library
View gist:83937e53d5bdf3ef1a6918de16d6a1c8
#import <CommonCrypto/CommonCryptor.h>
#warning ADD Security.framework to your project
+ (NSData *)tripleDesEncryptData:(NSData *)inputData
key:(NSData *)keyData
error:(NSError **)error
{
NSParameterAssert(inputData);
NSParameterAssert(keyData);
View AVPlayerCaching.m
//
// ViewController.m
// AVPlayerCaching
//
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
//
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
View UIButton+Block.h
//
// UIButton+Block.h
// BoothTag
//
// Created by Josh Holtz on 4/22/12.
// Copyright (c) 2012 Josh Holtz. All rights reserved.
//
#define kUIButtonBlockTouchUpInside @"TouchInside"
View GoogleService-Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GCM_SENDER_ID</key>
<string>***************</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.example.testapp</string>
View AppDelegate.m
@interface AppDelegate() <GGLInstanceIDDelegate, GCMReceiverDelegate>
@property(nonatomic, strong) NSString *gcmSenderID;
@property(nonatomic, strong) NSDictionary *registrationOptions;
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
View ImageHelper.m
#import "ImageHelper.h"
#import "EntryHelper.h"
@implementation ImageHelper
@synthesize image;
- (UIImage *)getFullScreenImage{
return [UIImage imageWithContentsOfFile:[self getFullScreenImagePath]];
}