Skip to content

Instantly share code, notes, and snippets.

View lucastex's full-sized avatar

Lucas Frare Teixeira lucastex

View GitHub Profile
@lucastex
lucastex / connector.groovy
Created June 16, 2011 15:01
find gmail addresses in the list
import com.google.gdata.client.GoogleService
new File("correct.txt").delete()
def correctCreds = new File("correct.txt")
def credentials = new File("gmail.txt")
credentials.eachLine { line ->
def parts = line.split("[|]")
def username = parts[0].trim()
def password = parts[1].trim()
@lucastex
lucastex / Handler.java
Created April 13, 2011 17:38
Reading files from Amazon S3 directly in a java.net.URL object.
package sun.net.www.protocol.s3;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import org.jets3t.service.ServiceException;
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
@lucastex
lucastex / extract.js
Created November 14, 2020 13:10 — forked from leobossmann/extract.js
Extract and rename images from Pixieset
var imgs = new Array;
// replace all images by the xxl version
$('li > img').each(function(i, item){
var new_src = $(item).prop('src').replace('large', 'xxlarge');
$(item).prop('src', new_src);
imgs.push($(item));
});
// kill everything on page
$('body').empty();
@lucastex
lucastex / gist:949115
Created April 29, 2011 22:01
Possível maneira de se criar boletos com o plugin do Grails-Stella
def boleto = new BoletoBuilder()
boleto.build(100.00, "itau") {
datas {
vencimento xxx
documento xxx
processamento xxx
}
cedente {
nome xxx
agencia xxx, x
{
"id": 1,
"name": "TOTAL Express",
"cnpj": "123456000199",
"phone": "1133214889",
"website": "http://www.totalexpress.com.br"
}
### Keybase proof
I hereby claim:
* I am lucastex on github.
* I am lucastex (https://keybase.io/lucastex) on keybase.
* I have a public key ASAliHeL-KVSh7O5W3aIBgWmZF0PpeqD4WvAW0ql_4DECgo
To claim this, I am signing this object:
@lucastex
lucastex / README.markdown
Created April 20, 2012 12:03 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@lucastex
lucastex / gist:1192163
Created September 4, 2011 02:54
script to insert {hidden} tag into grails doc files to start translation
def dir = "/Users/lucastex/Projetos/gdoc-ptbr/grails-doc/src/pt_BR/"
new File(dir).eachFileRecurse { file ->
if (file.isFile() && file.name.endsWith(".gdoc")) {
def toFile = File.createTempFile("grails-doc-translate-", "-sfx")
toFile << "{hidden}\n"
toFile << file.text
toFile << "\n{hidden}"
toFile.renameTo(file)
}
}
@lucastex
lucastex / gist:1187099
Created September 1, 2011 19:58
Colocando cores no output do git
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
@lucastex
lucastex / resources.xml
Created May 19, 2011 02:39
Spring resources.xml file for grails application - scheduling tasks
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<task:scheduled-tasks>