Skip to content

Instantly share code, notes, and snippets.

View pedrobrasileiro's full-sized avatar
💭
I may be slow to respond.

Pedro Brasileiro pedrobrasileiro

💭
I may be slow to respond.
View GitHub Profile
Alloy.Globals.Facebook = {};
Object.defineProperty(Alloy.Globals.Facebook, 'dataLogin', {
get: function() {
var dataLogin = Ti.App.Properties.getString('facebookDataLogin', null);
return dataLogin===null?null:JSON.parse(dataLogin);
},
set: function(dataLogin) {
Ti.App.Properties.setString('facebookDataLogin', JSON.stringify(dataLogin));
}
exports.smartLoading = function(win, text) {
var _loading = function() {
var anim = require('alloy/animation');
var full = Ti.UI.createView({
width : '100%',
height : '100%',
backgroundColor : '#AA000000'
});
E/TiApplication(23659): (main) [715194,715194] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 3.1.3,2013/09/18 12:01,222f4d1
E/TiApplication(23659): java.lang.NullPointerException
E/TiApplication(23659): at org.appcelerator.titanium.proxy.ActionBarProxy.handleSetTitle(ActionBarProxy.java:154)
E/TiApplication(23659): at org.appcelerator.titanium.proxy.ActionBarProxy.handleMessage(ActionBarProxy.java:207)
E/TiApplication(23659): at android.os.Handler.dispatchMessage(Handler.java:98)
E/TiApplication(23659): at android.os.Looper.loop(Looper.java:136)
E/TiApplication(23659): at android.app.ActivityThread.main(ActivityThread.java:5017)
/*! Socket.IO.js build:0.9.6, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */
/**
* Originally Ported to titanium by Jordi Domenech <jordi@iamyellow.net>
* source: https://github.com/iamyellow/socket.io-client
*/
this.io = {};
module.exports = this.io;
/**

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:consultarExtratoResponse xmlns:ns2="http://www.smartnet.com.br/services/vrrh/v20130418">
<return>
<codigoResposta>0</codigoResposta>
<descricaoResposta>Consulta de saldo realizada com sucesso</descricaoResposta>
<saldo>973.0</saldo>
<valorPendenteAutorizacao>0.0</valorPendenteAutorizacao>
<totalDebitos>27.0</totalDebitos>
<totalCreditos>0.0</totalCreditos>
@pedrobrasileiro
pedrobrasileiro / return.json
Last active December 18, 2015 15:59
Formato JSON Statements
{
"result": {
"message": "Response Statements limited to 30 days",
"status": 1,
"balance": 973,
"credit": 0,
"debit": 27,
"pendentValue": 0,
"statements": [
{
These are some needed bundles for TM2...
cd ~/Library/Application Support/Avian/Bundles
git clone https://github.com/cucumber/cucumber-tmbundle Cucumber.tmbundle
git clone https://github.com/kuroir/SCSS.tmbundle
git clone https://github.com/mads379/Whitespace.tmbundle
open Cucumber.tmbundle/color_themes/Sunburst.tmTheme
@pedrobrasileiro
pedrobrasileiro / return.json
Created June 12, 2013 18:09
Return WS Balance
{
"result": {
"message": "Success Balance",
"status": 1,
"balance": 973
}
}
public static synchronized void initialize(String appName) {
if (!initialized) {
if (appName != null) {
if (System.getProperty(SYSTEM_APPNAME) == null) {
System.setProperty(SYSTEM_APPNAME,appName);
}
} else {
appName = "undefined";
}
String log4j = System.getProperty("log4j.configuration.file");