Skip to content

Instantly share code, notes, and snippets.

View romainbriche's full-sized avatar

Romain Briche romainbriche

View GitHub Profile
@romainbriche
romainbriche / IPInsetLabel.h
Created May 7, 2012 08:14
IPInsetLabel: a simple UILabel subclass that adds padding insets and auto-height-resizing
//
// IPInsetLabel.h
// Instapaper
//
// Created by Marco Arment on 7/23/11.
// Copyright 2011 Instapaper LLC, released to the public domain.
//
#import <UIKit/UIKit.h>
//
// NSObject+setValuesForKeysWithJSONDictionary.h
// SafeSetDemo
//
// Created by Tom Harrington on 12/29/11.
// Copyright (c) 2011 Atomic Bird, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
@romainbriche
romainbriche / TweetViaTweetbot.applescript
Created August 3, 2012 16:19
Copy title and URL of the current page in Safari to a new tweet in Tweetbot for Mac
-- TweetViaTweetbot.applescript
-- Copy title and URL in the front most window of Safari to Tweetbot with link
-- Author: Romain Briche
on copyTitleAndLinkToTweetbot(theTitle, theURL)
tell application "System Events"
set tweet to theTitle & " " & theURL & " via @"
set the clipboard to tweet as text
@romainbriche
romainbriche / LineaSDK.h
Created August 18, 2012 05:53
LineaSDK header file
/****h* Functions
FUNCTION
In order to use Linea in your program, several steps have to be performed:
- Include LineaSDK.h and libLineaSDK.a in your project.
- Go to Frameworks and add ExternalAccessory framework
- Edit your program plist file, add new element and select "Supported external accessory protocols" from the list, then add two items to it - \
com.datecs.linea.pro.msr and com.datecs.linea.pro.bar
*****/
/****h* Barcode Engine
FUNCTION
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
ACTION = build
AD_HOC_CODE_SIGNING_ALLOWED = NO
ALTERNATE_GROUP = staff
ALTERNATE_MODE = u+w,go-w,a+rX
ALTERNATE_OWNER = grantdavis
ALWAYS_SEARCH_USER_PATHS = NO
ALWAYS_USE_SEPARATE_HEADERMAPS = YES
APPLE_INTERNAL_DEVELOPER_DIR = /AppleInternal/Developer
APPLE_INTERNAL_DIR = /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR = /AppleInternal/Documentation
@romainbriche
romainbriche / AZModel.h
Created July 19, 2012 12:35
Thread-safe NSManagedObjectContext factory.
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface AZModel : NSObject
+ (AZModel *)sharedModel;
- (__strong NSManagedObjectContext *)managedObjectContextForCurrentThread;
- (__autoreleasing NSManagedObjectContext *)newManagedObjectContextForCurrentThread;
@end
@romainbriche
romainbriche / EventEmitter.swift
Created October 24, 2017 11:12 — forked from brennanMKE/EventEmitter.swift
React Native Event Emitter for RCTEventEmitter in Objective-C and Swift
class EventEmitter
/// Shared Instance.
public static var sharedInstance = EventEmitter()
// ReactNativeEventEmitter is instantiated by React Native with the bridge.
private static var eventEmitter: ReactNativeEventEmitter!
private init() {}
# VERSION 1.0.4
# Author: @madhavajay
# This currently works for iOS and watchOS in the Simulator and Devices
# Changes
# Using ${TOOLCHAIN} in two places now
# Added double quotes " around paths
# Fixed watchOS Issues
# Instructions iOS