This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Created by Léo Hackin (leohackin at gmail.com), Jan 2011 | |
# This file is free software. You are free to use this file in any way you like | |
# However, if you change it you should note in this file that you did and who | |
# you are, you also need to change the version string if you do. That way | |
# I will not get support questions for software that is not entirely mine. | |
# rastreia_encomenda_correios v.0.1a for mac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEmpty(obj) { | |
for (var prop in obj) { | |
if (obj.hasOwnProperty(prop)) { | |
return false; | |
} | |
} | |
return true; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exibindo o JSON no console | |
curl "http://api.twitter.com/1/trends.json" | python -mjson.tool | |
// Salvando em algum arquivo | |
curl "http://api.twitter.com/1/trends.json" | python -mjson.tool > response.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.google.com/spreadsheet/viewform?formkey=dGRrUnFwNmZBMkRLN25xN0NtMGNOeFE6MQ | |
Controle de Permissão com VRaptor 3 | |
Será apresentado uma forma fácil e eficaz de criar um controle de permissão de acesso | |
baseado nas roles de cada usuário utilizando o VRaptor 3. Apresentando o conceito de | |
interceptor e annotation sua aplicação pode ter um maior controle sobre as ações ocorridas. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// At line 118 located after the i*86) case on db2setup and db2_install file, insert: | |
x86_64) | |
INSTALLDIR="${PROGDIR?}/db2/macos/install" | |
PLATNAME="MacOS/x86_64" ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install libstdc++5 | |
sudo apt-get install libaio-dev | |
sudo ./db2setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop | |
2. cd /tmp | |
3. ln -s /var/lib/mysql/mysql.sock mysql.sock | |
3. sudo /Library/StartupItems/MySQLCOM/MySQLCOM start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (boo) { | |
$(elem).show(); | |
} else { | |
$(elem).hide(); | |
} | |
$(elem)[boo ? 'show' : 'hide'](); | |
$(elem).toggle(boo); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Intercepts | |
public class AjaxExceptionInterceptor implements Interceptor { | |
private final HttpServletRequest request; | |
private final Result result; | |
public AjaxExceptionInterceptor(HttpServletRequest request, Result result) { | |
this.request = request; | |
this.result = result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DEBUG INFO WARN ERROR FATAL | |
log4j.rootCategory=WARN, file | |
log4j.appender.file=org.apache.log4j.RollingFileAppender | |
log4j.appender.file.layout=org.apache.log4j.PatternLayout | |
log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss} %-5p [%-30c{1}] %m%n | |
log4j.appender.file.File=/home/your-user/log.log | |
log4j.appender.file.MaxBackupIndex=2 | |
log4j.appender.file.MaxFileSize=1MB |
OlderNewer