Skip to content

Instantly share code, notes, and snippets.

View lucastex's full-sized avatar

Lucas Frare Teixeira lucastex

View GitHub Profile
@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();
{
"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 / pipeHook.js
Last active August 29, 2015 14:16 — forked from Marak/pipeHook.js
Pipe Hooks into each other
module['exports'] = function pipeHook (hook) {
hook.debug('Opening echo hook with some data');
var hook2 = hook.open('http://hook.io/Marak/echo?foo=bar');
hook2.write('hello!');
hook2.pipe(hook.res);
};
@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 / 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 / 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>
#!/bin/bash
mkdir /root/startscript
echo 'Iniciando script' >> /root/startscript/init.log
#atualiza yum
yum -y update > /root/startscript/yum-update.log
echo 'Atualizou YUM' >> /root/startscript/init.log
#instala tomcat