This file contains hidden or 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
| git stash list| sed 's/\//\_/g'|sed 's/ /\_/g' | awk -F ":" '{ system("git stash show -p " $1 " >> " $1$2$3 ".diff" ) }' |
This file contains hidden or 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
| GRANT ALL PRIVILEGES ON * to 'root'; |
This file contains hidden or 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
| cd /Volumes/DIR | |
| find ./ -type d > file.txt |
This file contains hidden or 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
| exiftool -d %Y/%m/%d "-directory<createdate" * |
This file contains hidden or 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
| SELECT DISTINCT TABLE_NAME | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE COLUMN_NAME LIKE '%field_name%' AND TABLE_SCHEMA = 'scheme_name'; |
This file contains hidden or 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. Install git -> http://git-scm.com/download | |
| 2. Install dotfiles -> $ cd; git clone git@github.com:mourawaldson/dotfiles.git .dotfiles && bash .dotfiles/install | |
| 3. Install vcprompt -> $ cd; mkdir ~/bin && curl -sL https://github.com/djl/vcprompt/raw/master/bin/vcprompt > ~/bin/vcprompt && chmod 755 ~/bin/vcprompt && sudo mv ~/bin/vcprompt /bin/vcprompt && sudo rm -rf ~/bin | |
| 4. Install .osx -> $ cd; bash .dotfiles/.osx |
This file contains hidden or 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
| public final static String[] split(String texto, char separador) { | |
| if (texto == null) | |
| return null; | |
| int tamanhoTexto = texto.length(); | |
| if(tamanhoTexto == 0) | |
| return null; | |
| Vector lista = new Vector(); |
This file contains hidden or 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
| import java.io.BufferedInputStream; | |
| import java.io.BufferedOutputStream; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| /** | |
| * Salvar arquivo. | |
| * |
This file contains hidden or 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
| import java.io.File; | |
| /** | |
| * Retorna a extensão do arquivo. | |
| * | |
| * @param file | |
| * @return string Extensão | |
| */ | |
| public static String getExtension(String file) { | |
| return file.substring(file.lastIndexOf(".") + 1, file.length()); |
This file contains hidden or 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
| /** | |
| * Verifica se a String passada por parâmetro é nula ou vazia. | |
| * | |
| * @param str | |
| * String | |
| * @return boolean true se a String for "null" ou vazia; false caso exista | |
| * conteúdo. | |
| */ | |
| public static boolean isNullOrEmpty(String str) { | |
| return ((str == null || str.isEmpty()) || str.trim().length() == 0) ? true |
NewerOlder