Skip to content

Instantly share code, notes, and snippets.

View flexaddicted's full-sized avatar

Lorenzo B. flexaddicted

View GitHub Profile
@shazron
shazron / sim-run.sh
Created October 25, 2011 21:53
Run Xcode Simulator project from the command line
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1
@brian-mann
brian-mann / FadeTransitionRegion.js
Created October 24, 2012 16:28
Allows jQuery animation transitions between marionette regions
var FadeTransitionRegion = Backbone.Marionette.Region.extend({
show: function(view){
this.ensureEl();
view.render();
this.close(function() {
if (this.currentView && this.currentView !== view) { return; }
this.currentView = view;
@janodev
janodev / Makefile
Last active September 23, 2016 19:47 — forked from boredzo/Makefile
dispatch_once is not reentrant. Use a NSReentrantLock if you want reentrancy.
CC=clang
CFLAGS+=-std=c99 -g
LDFLAGS+=-framework Foundation
dispatch_once_reentrancy_test: dispatch_once_reentrancy_test.o
@orta
orta / gist:6173320
Created August 7, 2013 11:38
iOS7 APIs for creating attributed strings from HTML
//
// NSAttributedString+StringFromHTML.m
// Artsy
//
// Created by Orta on 06/08/2013.
// Copyright (c) 2013 Art.sy. All rights reserved.
//
// This doesn't produce acceptable enough results, and thus is relagated here for another day sometime
@ArtFeel
ArtFeel / MGNavigationTransitioningDelegate.h
Last active August 1, 2019 21:23
Simple sliding transitioning for navigation controller mimics pre iOS7 push/pop animations.All you need, is simply set delegate for you navigation controller: self.navigationController.delegate = self.navigationTransitioningDelegate;NavigationController does not retain delegate, so you should hold it. Note: this code is free (http://unlicense.org)
//
// MGNavigationTransitioningDelegate
//
// Created by Philip Vasilchenko on 27.11.13.
//
#import <UIKit/UIKit.h>
@interface MGNavigationTransitioningDelegate : NSObject <UINavigationControllerDelegate>
@ddrccw
ddrccw / hello.h
Created January 14, 2014 04:03
detect jailbreak
//
// Created by ddrccw on 14-1-10.
// Copyright (c) 2014年 ddrccw. All rights reserved.
// refer to http://danqingdani.blog.163.com/blog/static/1860941952012102122847478/
#import <sys/stat.h>
#import <mach-o/dyld.h>
//#import <stdlib.h>
//#import <string.h>
@efeciftci
efeciftci / strtok_example.c
Last active October 25, 2021 04:28
An example that shows usage of strtok function in C programming language.
/*
* The following description is from Linux Programmer's Manual (strtok(3)):
*
* #include <string.h>
* char *strtok(char *str, const char *delim);
*
* The strtok() function breaks a string into a sequence of zero or more
* nonempty tokens. On the first call to strtok() the string to be parsed
* should be specified in str. In each subsequent call that should parse
* the same string, str must be NULL.
@brentsimmons
brentsimmons / headerview.m
Created April 26, 2014 22:09
UITableView header issues
#pragma mark - Class Methods
+ (BOOL)requiresConstraintBasedLayout {
return YES;
}
#pragma mark - Init
- (id)initWithFrame:(CGRect)frame {
@andreacremaschi
andreacremaschi / UITableView+Header
Last active June 28, 2020 04:19
UITableView category to resize table view header using autolayout
UITableView convenience classes for resizing header and footer with autolayout.
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing