Skip to content

Instantly share code, notes, and snippets.

View PauloLuan's full-sized avatar
💭
Ora et labora

Paulo Luan PauloLuan

💭
Ora et labora
View GitHub Profile
@PauloLuan
PauloLuan / Mint_to_developers
Created November 26, 2012 12:53
Script que prepara o ambiente de desenvolvimento completo para uma sistema operacional novo.
#!/bin/bash
sudo apt-get update
# UN-WELCOME
sudo apt-get remove -y banshee
sudo apt-get remove -y brasero
sudo apt-get remove -y pidgin
sudo apt-get remove -y thunar
sudo apt-get remove -y thunderbird
Ti.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
backgroundColor : '#fff',
title : 'Win 1'
});
win1.open();
var data = [{
title : 'One'
}, {
@PauloLuan
PauloLuan / gist:7123760
Created October 23, 2013 18:16
Slides 5 JUG Vale.
Slides! :D
Ringo is a CommonJS-based JavaScript runtime written in Java and based on the Mozilla Rhino JavaScript engine. It takes a pragmatical and non-dogmatic stance on things like I/O paradigms. Blocking and asynchronous I/O both have their strengths and weaknesses in different areas.
http://ringojs.org/
http://ringojs.org/documentation/
====================================================================================
"[{"Data":"02/09/2013","Ordem de Pagamento":"2311/2013","Número Baixa de OP":"1383","Nome":"ELAINE CRISTINA DE SOUZA","CPF/CNPJ":"334.949.968-65","Tipo de Movimento":"Pagamento","Despesa":"344,40","Desconto":"0,00","Pago":"344,40","Banco / Conta":"104 / 00351-8 / 00600200001-4","Recurso":"01 - TESOURO","Aplicação":"110.0000 - GERAL"},{"Data":"02/09/2013","Ordem de Pagamento":"2312/2013","Número Baixa de OP":"1383","Nome":"RODRIGO RICOTTA TOLEDO","CPF/CNPJ":"340.552.038-02","Tipo de Movimento":"Pagamento","Despesa":"344,40","Desconto":"0,00","Pago":"344,40","Banco / Conta":"104 / 00351-8 / 00600200001-4","Recurso":"01 - TESOURO","Aplicação":"110.0000 - GERAL"},{"Data":"02/09/2013","Ordem de Pagamento":"2313/2013","Número Baixa de OP":"1383","Nome":"ROGER CORTES ARANTES","CPF/CNPJ":"136.907.348-86","Tipo de Movimento":"Pagamento","Despesa":"592,20","Desconto":"0,00","Pago":"592,20","Banco / Conta":"104 / 00351-8 / 00600200001-4","Recurso":"01 - TESOURO","Aplicação":"110.0000 - GERAL"},{"Data":"02/09/2013","Orde
(function ($) {
$.fn.tableToJSON = function (opts) {
// Set options
var defaults = {
ignoreColumns: [],
onlyColumns: null,
ignoreHiddenRows: true,
headings: null
};
@PauloLuan
PauloLuan / Sublime Keybind
Created November 22, 2013 22:42
Sublime Keybind
[
{ "keys": ["ctrl+shift+f"], "command": "reindent" , "args": {"single_line": false}},
{ "keys": ["ctrl+shift+s"], "command": "save_all" },
{ "keys": ["ctrl+shift+k"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} },
{ "keys": ["ctrl+r"], "command": "show_panel", "args": {"panel": "replace", "reverse": false} },
]
package br.inpe.mobile.photo;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="Luan" version="12">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
/**
* Calculate the distance between two geopoints (Latitude and Longitude)
* in WGS84
*
* @param latitudeOne
* @param longituteOne
* @param latituteTwo
* @param longituteTwo
*
* @return distance the distance in kilometers
@PauloLuan
PauloLuan / gist:fb690cc720270dcabb6d
Created June 3, 2014 13:46
MultipartHTTPUtility.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;