Skip to content

Instantly share code, notes, and snippets.

View leoluz's full-sized avatar

Leonardo Luz Almeida leoluz

View GitHub Profile
@leoluz
leoluz / git_latest_tag_name
Created June 10, 2014 17:46
[git] return the latest tag name created in the repo
git for-each-ref --count=1 --sort=-taggerdate --format='%(refname:short)'
@leoluz
leoluz / gist:9087940
Created February 19, 2014 08:13
search for a string in jar/zip files
sudo find libdir/ -name "*.jar" -exec zipgrep -n "Your String Here" '{}' \;
@leoluz
leoluz / gist:6318789
Created August 23, 2013 12:29
pricerow impex
$catalogVersion=catalogVersion(catalog(id[default='electronicsProductCatalog']),version[default='Online'])[unique=true,default='electronicsProductCatalog:Online']
INSERT_UPDATE PriceRow;$catalogVersion;unit(code);price;currency(isocode)[unique=true];channel(code)[unique=true];product(code,$catalogVersion)[unique=true]
;;pieces;20.00;USD;;107701
;;pieces;12.34;USD;"mobile";107701
;;pieces;15.00;USD;"desktop";107701
@leoluz
leoluz / tab_remove.sh
Created June 15, 2012 15:45
Remove tab character from files
expand -t 4 "$1" > /tmp/expand.tmp
mv /tmp/expand.tmp "$1"
@leoluz
leoluz / grepSVNRepo.sh
Created June 15, 2012 15:34
How to grep a svn repo ignoring .svn files
find . -not \( -name *.svn -prune \) -type f -exec grep -ril HelloWorld {} \;
@leoluz
leoluz / remove_svn_dirs
Created August 12, 2010 20:19
Search and remove all .svn dirs from a local subversion repo
find . -type d -name .svn -exec rm -rf {} \;
@leoluz
leoluz / gae_guestbook.py
Created May 30, 2010 00:53
google app engine quick example
import cgi
from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class Greeting(db.Model):
author = db.UserProperty()
content = db.StringProperty(multiline=True)
http://wiki.locaweb.com.br/pt-br/Usando_GIT_na_Hospedagem_Linux
<property name="connection.datasource">jdbc/MeuDataSource</property>
@leoluz
leoluz / Acessando BigWS com Python (suds).py
Created August 23, 2009 03:42
Accessing a SOAP-WS within python using suds
# Esse exemplo foi testado com o exercicio do capitulo 20
# do curso da Caelum (fj31)
#
# Para instalar a lib do suds faca como root:
# $sudo easy_install suds
# digite python no terminal para invocar o interpretador do python.
# Em seguida digite as seguintes linhas:
>>>from suds.client import Client