Skip to content

Instantly share code, notes, and snippets.


Leonardo CavalcanteLeo

View GitHub Profile
View Preferences.sublime-settings
"color_inactive_tabs": true,
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"draw_indent_guides": false,
View UIView+Parallax.h
// UIView+Parallax.h
#import <Foundation/Foundation.h>
@interface UIView (Parallax)
CavalcanteLeo /
Created Jul 15, 2016 — forked from sekati/
Xcode Auto-increment Build & Version Numbers
# @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 / 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
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" "">
<plist version="1.0">
View AppDelegate.m
@interface AppDelegate() <GGLInstanceIDDelegate, GCMReceiverDelegate>
@property(nonatomic, strong) NSString *gcmSenderID;
@property(nonatomic, strong) NSDictionary *registrationOptions;
@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]];