Skip to content

Instantly share code, notes, and snippets.

View rubenfonseca's full-sized avatar

Ruben Fonseca rubenfonseca

View GitHub Profile
@rubenfonseca
rubenfonseca / keybase.md
Created August 4, 2017 11:36
keybase.md

Keybase proof

I hereby claim:

  • I am rubenfonseca on github.
  • I am rubenfonseca (https://keybase.io/rubenfonseca) on keybase.
  • I have a public key ASADQ8GVtbnPgYgcePYLZglvPktfE5r9xK8Nd6dpr4dd-wo

To claim this, I am signing this object:

unsigned swap16(unsigned arg)
{
return ((arg >> 8) & 0x00FF) | ((arg << 8) & 0xFF00);
}
### Keybase proof
I hereby claim:
* I am rubenfonseca on github.
* I am rubenfonseca (https://keybase.io/rubenfonseca) on keybase.
* I have a public key whose fingerprint is 1DAC 72C5 CD4A 4387 BB49 CA63 BFD3 29F4 303E 036B
To claim this, I am signing this object:
@rubenfonseca
rubenfonseca / fontforge
Created March 3, 2013 20:30
Fix for compiling fontforge in Mountain Lion 10.8.2
diff --git a/fontforge/startui.c b/fontforge/startui.c
index 6eb9a62..62f4155 100644
--- a/fontforge/startui.c
+++ b/fontforge/startui.c
@@ -50,6 +50,7 @@
# include </Developer/Headers/FlatCarbon/Files.h>
# define FontInfo MacFontInfo
# define KernPair MacKernPair
+# define AnchorPoint MacAnchorPoint
# include </Developer/Headers/FlatCarbon/CarbonEvents.h>
@rubenfonseca
rubenfonseca / app.js
Created June 5, 2012 14:27
Custom menu on Sharekit
var dialog = Ti.UI.createOptionsDialog({
title: "Share",
options: ['Twitter', 'Facebook', 'Mail', 'Cancel'],
cancel: 3 // index of cancel option
});
dialog.addEventListener('click', function(e) {
if(e.index == e.cancel) { return; }
var sharer = null;
@rubenfonseca
rubenfonseca / Entitlements.plist
Created April 26, 2012 22:42
Custom Entitlements
<?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>keychain-access-groups</key>
<array>
<string>com.couchone.touchdb</string>
<string>com.0x82.sharekit_custom_group</string>
</array>
</dict>
@rubenfonseca
rubenfonseca / backbone.sync.js
Created April 10, 2012 19:08
Backbone + Titanium - part 2
//Customise Backbone.sync to work with Titanium rather than jQuery
var getUrl = function(object) {
if (!(object && object.url)) return null;
return _.isFunction(object.url) ? object.url() : object.url;
};
Backbone.sync = (function() {
var methodMap = {
'create': 'POST',
'read' : 'GET',
@rubenfonseca
rubenfonseca / Rakefile
Created March 4, 2012 18:15
Rakefile + CoffeeScript + Titanium Mobile example
DEV_PROVISIONING_UUID = "3E4D9E49-E44B-4B73-AFAD-248C720ECD53"
DEV_SIGN = "Ruben Fonseca"
DEV_APP_NAME = "My greatest app"
DEV_APP_ID = 'com.0x82.app'
TITANIUM_SDK_VERSION = '1.8.2'
IPHONE_SDK_VERSION = '5.0'
BUILDER_PATH = "/Library/Application Support/Titanium/mobilesdk/osx/#{TITANIUM_SDK_VERSION}/iphone/builder.py"
if File.exists?(BUILDER_PATH)
diff --git a/Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBRequest.h b/Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBRequest.h
index 75ac9e7..4ad296d 100644
--- a/Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBRequest.h
+++ b/Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBRequest.h
@@ -52,7 +52,7 @@
*/
+ (FBRequest*)requestWithSession:(FBSession*)session delegate:(id<FBRequestDelegate>)delegate;
-@property(nonatomic,assign) id<FBRequestDelegate> delegate;
+@property(nonatomic,retain) id<FBRequestDelegate> delegate;
commit 1d1d7ce4147fcaa1f8b0b58cf67980dec2cde864
Author: Tollef Fog Heen <tfheen@err.no>
Date: Sun May 15 14:32:10 2011 +0200
Drop AM_MAINTAINER_MODE
commit 097eaeb70e971b125a0fc889aa6fd3241c53467f
Author: Tollef Fog Heen <tfheen@err.no>
Date: Sun May 15 14:32:02 2011 +0200