Skip to content

Instantly share code, notes, and snippets.

View 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:

@rubenfonseca
rubenfonseca / fontforge
Created Mar 3, 2013
Fix for compiling fontforge in Mountain Lion 10.8.2
View fontforge
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 Jun 5, 2012
Custom menu on Sharekit
View app.js
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;
View Entitlements.plist
<?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 Apr 10, 2012
Backbone + Titanium - part 2
View backbone.sync.js
//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 Mar 4, 2012
Rakefile + CoffeeScript + Titanium Mobile example
View Rakefile
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)
View patch1.patch
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;
View ChangeLog
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
View gist:1111469
<?xml version="1.0"?>
<GMSResponse>
<login success="true" hasupdate="true"/>
<screen id="homepage">
...
</screen>
<tabs>
<tab icon="icon_selfcare_tab" title="Gest&#xE3;o de Conta" screenid="selfcare"/>
<tab icon="icon_services_tab" title="Servi&#xE7;os" screenid="serv_list"/>
<tab icon="icon_rateplan_tab" title="Tarif&#xE1;rios" screenid="rateplan"/>
@rubenfonseca
rubenfonseca / app.js
Created Jul 13, 2011
Google Analytics Module
View app.js
var google_analytics = require('com.0x82.google.analytics');
google_analytics.addEventListener('complete', function(e) {
Ti.API.log(e);
});
google_analytics.startTracker({
accountID: 'UA-2061857-1',
debug: true
});