Skip to content

Instantly share code, notes, and snippets.

View tibo's full-sized avatar

Thibaut LE LEVIER tibo

  • Nantes, France
View GitHub Profile
@tibo
tibo / gist:0609a7e1a7781e658bde
Created July 5, 2015 10:38
Allow clear HTTP on localhost in iOS 9
<?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>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
@tibo
tibo / NSURLRequest+printCurlRequest.m
Created April 16, 2013 09:18
print Curl request from an NSURLRequest for replay/debug purposes
@implementation NSURLRequest (printCurlRequest)
-(NSString *)curlRequest
{
__block NSString *curlstr = [NSString stringWithFormat:@"curl -k -X %@ --dump-header -",self.HTTPMethod];
[[self allHTTPHeaderFields] enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
curlstr = [curlstr stringByAppendingFormat:@" -H \"%@: %@\"",key, obj];
}];
force ARC enable
#if !__has_feature(objc_arc)
#error THIS CODE MUST BE COMPILED WITH ARC ENABLED!
#endif
# /bin/bash
#Usage: $ ./cs_xproj_validate.sh path/to/xcode/project/file/theproject.xcodeproj
#More info: http://stackoverflow.com/q/13962341/89035
PROJECT_FILE="$1/project.pbxproj"
PREVIOUS_LINE=-1
for LINE in `cat "$PROJECT_FILE" | grep -n CODE_SIGN_IDENTITY | grep -o -E '^([0-9]*)'`
@tibo
tibo / LoginViewController.m
Created November 20, 2012 00:56
handle error by inheriting viewcontrollers
@interface LoginViewController : ParentViewController ()
@end
// ...
@implementation
#pragma mark LoginServiceDelegate
-(void)loginDidFailWithError:(NSError *)loginError
@tibo
tibo / Ambassade Appsterdam Paris.txt
Created August 2, 2012 16:01
Ambassade Appsterdam Paris
Bonjour à tous,
Je me permets de vous contacter aujourd'hui pour vous parler d'un nouveau projet, dont j'ai parlé à certains d'entre vous et que je porte avec l'aide de quelques personnes: la création d'une ambassade Appsterdam à Paris !
Qu'est-ce qu'Appsterdam :
Appsterdam est une communauté fondée en 2011 par Mike Lee (@bmf) afin de fédérer les créateurs d'applications, qu'ils soient développeurs, designer, marqueteux, entrepreneur, étudiants... toutes plateformes et langages confondus.
Établis initialement à Amsterdam, le projet commence à prendre forme aux 4 coins du monde sous la forme d'ambassade, portants les idées d'Appsterdam au sein de la culture locale.
@tibo
tibo / deploy.plist
Created June 4, 2012 13:34
iOS add hoc deployement manifest sample
<?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>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
@tibo
tibo / iOSPeelAwayExample.m
Created April 24, 2012 14:37 — forked from markrickert/iOSPeelAwayExample.m
iOS Peel-Away Example
- (IBAction) pressedPeelIt:(UIButton *)sender
{
//Disable the button so they can't press it
self.peelIt.enabled = NO;
[self.textHere resignFirstResponder];
//Create a new UIView and set the background color to be a UIColor with pattern image of a screen capture
UIView *imgView = [[UIView alloc] init];
[self.view addSubview:imgView];
@tibo
tibo / org.jenkins-ci.jenkins.plist
Created February 7, 2011 01:37
Jenkins Launchd configuration
<?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>UserName</key>
<string>jenkins</string>
<key>Label</key>
<string>org.jenkins-ci.jenkins</string>
<key>EnvironmentVariables</key>
<dict>