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
@pedrobrasileiro
pedrobrasileiro / index.js
Created December 17, 2012 18:26
index.js
$.index.open();
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@pedrobrasileiro
pedrobrasileiro / push_notification.js
Created April 9, 2013 22:17
Push Notification - Titanium
//////////////////////push_notifications.js///////////////////////
var apns = function(){
var pref = require('preferences').preferences;
Titanium.Network.registerForPushNotifications({
types: [
Titanium.Network.NOTIFICATION_TYPE_BADGE,
Titanium.Network.NOTIFICATION_TYPE_ALERT
],
success:function(e)
@pedrobrasileiro
pedrobrasileiro / return.json
Last active December 17, 2015 10:09
Formato JSON WS VRHR
{
"result": {
"message": "MESSAGE_SERVER", // Status Description
"status": 1 // Positive for Success, Negative or ZERO for Errors,
"establishments" : [
{
"address": "ALBERTO CRAVEIRO",
"cep": 60860000,
"city": "FORTALEZA",
"complementNumber": "",
@pedrobrasileiro
pedrobrasileiro / return.json
Created June 7, 2013 19:59
Return WS Products
{
"result": {
"message": "Response Products no limit",
"status": 1,
"products": [
{
"id": "00001",
"name": "VR"
},
{
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");
@pedrobrasileiro
pedrobrasileiro / return.json
Created June 12, 2013 18:09
Return WS Balance
{
"result": {
"message": "Success Balance",
"status": 1,
"balance": 973
}
}
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
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": [
{
<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>