Skip to content

Instantly share code, notes, and snippets.

View fantattitude's full-sized avatar
🎯
Focusing

Vivien Leroy fantattitude

🎯
Focusing
View GitHub Profile
@fantattitude
fantattitude / TransitionController.h
Created February 23, 2016 10:33 — forked from xjones/TransitionController.h
TransitionController for animating iOS view controller transitions w/o a controller stack
//
// TransitionController.h
//
// Created by XJones on 11/25/11.
//
#import <UIKit/UIKit.h>
@interface TransitionController : UIViewController
@fantattitude
fantattitude / keybase.md
Last active October 8, 2015 08:22
keybase.md

Keybase proof

I hereby claim:

  • I am fantattitude on github.
  • I am fantattitude (https://keybase.io/fantattitude) on keybase.
  • I have a public key whose fingerprint is F217 B38B 1B12 79DA 90B1 24A6 20D4 BDE2 BB8F 93E2

To claim this, I am signing this object:

@fantattitude
fantattitude / LaPoste.txt
Created April 8, 2013 09:53
Public API available to get french mailbox location
Use this kind of URL :
http://maps.webnet.fr/Parcours2/GetBALXML.aspx?&lat=50,6138111&lng=3,0423599&lt1=40.6245285569843&lg1=0.109302520751953&lt2=60.66806914857679&lg2=5.1135940551757812
The website is hosted by webnet which is the society hired by La Poste to made the website showing all mailboxes in France.
I'll probably made a gem and a objc library (and app) to get access to such useful datas !
@fantattitude
fantattitude / gist:4353648
Created December 21, 2012 15:57
UIView to UIImage category method by @Dimillian
+ (UIImage*)captureView:(UIView *)viewToCapture {
if([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
UIGraphicsBeginImageContextWithOptions(viewToCapture.bounds.size, NO, [UIScreen mainScreen].scale);
else
UIGraphicsBeginImageContext(viewToCapture.bounds.size);
[viewToCapture.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
@fantattitude
fantattitude / gist:3627354
Created September 4, 2012 22:21
Spotify URL Regexp
spotifyReg = /(https?:\/\/open.spotify.com\/(track|user|artist|album)\/[a-zA-Z0-9]+(\/playlist\/[a-zA-Z0-9]+|)|spotify:(track|user|artist|album):[a-zA-Z0-9]+(:playlist:[a-zA-Z0-9]+|))/
@fantattitude
fantattitude / gist:3614500
Created September 3, 2012 23:03
Go from simple http link to twitter embed automagically using RedCarpet !
def autolink(link, link_type)
statusReg = /https?:\/\/twitter\.com\/[a-zA-Z]+\/status\/([0-9]+)/
if link_type == :url
if link =~ statusReg
tweet = statusReg.match(link)
urlTweet = tweet[0]
idTweet = tweet[1]
uri = URI.parse("https://api.twitter.com/1/statuses/oembed.json?id=#{idTweet}")
http = Net::HTTP.new(uri.host, uri.port)
@fantattitude
fantattitude / gist:3403116
Created August 20, 2012 10:47
What's the difference between a good and a bad place to work ?

Me:

“Do you know the difference between a good place to work and a bad place to work?”

Steve:

“Umm, I think so.”

Me:

“What is the difference?”

Steve: