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
exports.smartLoading = function(win, text) {
var _loading = function() {
var anim = require('alloy/animation');
var full = Ti.UI.createView({
width : '100%',
height : '100%',
backgroundColor : '#AA000000'
});
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));
}
var http = Ti.Network.createHTTPClient({
onerror : function(e) {
console.error('Error Send Photo : '+ e);
args.error(e);
},
onload : function () {
console.debug('Success Send Photo : '+ JSON.stringify(data));
args.success({responseText : this.responseText});
},
onsendstream : function(e) {
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23311191640114013)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
import java.util.*;
import java.io.*;
import java.security.*;
public class ChangePassword
{
private final static JKS j = new JKS();
public static void main(String[] args) throws Exception
{
/*
Author: James Shrager (@jshrager)
Intended use: Appcelerator Titanium
Usage: http://www.LearningTitanium.com (@learningTi)
*/
var client_id = "YOUR_CLIENT_ID";
var client_secret = "YOUR_CLIENT_SECRET";
var redirectUri = 'http://YOUR_URL/foursquareCallback.php';
var ui = require('ui/ui');
#----------------------------------------------------------------------------
# Git Setup
#----------------------------------------------------------------------------
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
public/uploads/*
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
--------------------------------------------------------------------------------
/Users/dchelimsky/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -rrubygems /Users/dchelimsky/.rvm/gems/ruby-1.8.7-p249/gems/rspec-core-2.0.0.beta.6/bin/rspec /Users/dchelimsky/tmp/example/spec/models/widget_spec.rb /Users/dchelimsky/tmp/example/spec/views/widgets/show.html.erb_spec.rb /Users/dchelimsky/tmp/example/spec/views/widgets/edit.html.erb_spec.rb /Users/dchelimsky/tmp/example/spec/views/widgets/new.html.erb_spec.rb /Users/dchelimsky/tmp/example/spec/controllers/widgets_controller_spec.rb /Users/dchelimsky/tmp/example/spec/views/widgets/index.html.erb_spec.rb
*...................
module Multiprocess
def self.start num_thread, list
unless block_given?
Servico::Log.andamento_monitor "Nenhum bloco foi passado"
return false
end
# Pra cada elemento do list passado, quero executar o yield passando esse elemento pra ele.
list.each {|i| ???}
end
# -*- coding: utf-8 -*-
Savon::Client.class_eval do
# Retorna nil caso não consiga comunicação
def get_hash_body method, params={}
begin
retorno = nil
resp = "#{method.to_s}_response".to_sym
ret = "#{method.to_s}_return".to_sym