Skip to content

Instantly share code, notes, and snippets.

View remirobert's full-sized avatar
🥐
Bonjour

Remi ROBERT remirobert

🥐
Bonjour
View GitHub Profile
@remirobert
remirobert / NSAttributedString+Height.m
Created May 9, 2019 09:49
NSAttributedString height calculation category
@import CoreText;
@implementation NSAttributedString (Size)
- (CGFloat)heightForAttributedStringWithWidth:(CGFloat)inWidth {
if (self.length == 0) {
return 0;
}
NSTextStorage *textStorage = [[NSTextStorage alloc]

Keybase proof

I hereby claim:

  • I am remirobert on github.
  • I am remirobert (https://keybase.io/remirobert) on keybase.
  • I have a public key ASB-BdNX7rRFqS7fg8aqDnGPLu01uhifCgceL-94gWoXWwo

To claim this, I am signing this object:

import UIKit
import CameraEngine
class ViewController: UIViewController {
let cameraEngine = CameraEngine()
override func viewDidLoad() {
super.viewDidLoad()
import UIKit
import SnapKit
import FLAnimatedImage
class ViewController: UIViewController {
let urlImage = "http://i.giphy.com/13YkBrhLJdziXm.gif"
var aniamtedImageView: FLAnimatedImageView = {
return FLAnimatedImageView()
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
@remirobert
remirobert / index.ios.js
Created December 18, 2015 08:44
Experimentation React Native
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
@remirobert
remirobert / .conf
Created November 15, 2015 01:32
surge shadowsocks configuration
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0/9, 119.0.0.0/9, 119.128.
@remirobert
remirobert / .conf
Created November 15, 2015 01:32
surge shadowsocks configuration
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10, 118.0.0.0/11, 118.64.0.0/10, 118.128.0.0/9, 119.0.0.0/9, 119.128.
@remirobert
remirobert / badge.swift
Created April 30, 2015 12:24
badge label
import UIKit
class MIBadgeLabel: UILabel {
override func drawRect(rect: CGRect)
{
// Drawing code
let ctx: CGContextRef = UIGraphicsGetCurrentContext()
let borderPath: UIBezierPath = UIBezierPath(roundedRect: rect, byRoundingCorners:UIRectCorner.AllCorners, cornerRadii: CGSizeMake(10.0, 10.0))
@remirobert
remirobert / ModelContainer.m
Created April 27, 2015 14:19
ModelContainer
//
// Model3D.m
// 3DModel
//
// Created by Remi Robert on 24/04/15.
// Copyright (c) 2015 Remi Robert. All rights reserved.
//
#import <objc/runtime.h>
#import "ModelContainer.h"