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
class Class: | |
pass | |
x = Class() | |
x.something = 42 | |
print(x.something) # 42 |
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
// Listing users data from web sites like "domain.com/users/<id>" | |
// | |
// JQuery is required | |
// First, access the index users list, like domain.com/users/ | |
// And execute the function on firebug console or similar | |
var localizados = []; | |
function search(initialId,finalId) { | |
if (initialId > finalId) return; | |
var id = initialId; |
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
Show hidden characters
{ | |
"cmd": ["sh", "-c", "javac $file_base_name.java && java $file_base_name"], | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": "source.java" | |
} |
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
# first, download JRE on www.java.com and install it (jre installed by apt-get not work) | |
# For Chrome: | |
sudo mkdir /opt/google/chrome/plugins | |
sudo ln -s /usr/java/jre1.7.0_17/lib/i386/libnpjp2.so /opt/google/chrome/plugins/ | |
# For Firefox: | |
sudo ln -s /usr/java/jre1.7.0_17/lib/i386/libnpjp2.so /usr/lib/firefox/plugins/ |
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 | |
# sincroniza os micros inspiron e dimension usando rsync | |
# | |
# executando: | |
# | |
# thiago@inspiron:~/sincronismo$ sudo sh sincronizar.sh | |
# | |
# O uso da chave ssh evita que a senha de root do micro remoto seja solicitada | |
# a cada comando rsync. Caso a chave ssh não exista, a senha de root do micro |
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
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/Public/Documents/ /home/thiago/Documentos/backup.windows/Public/Documents | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/Public/Music/ /home/thiago/Documentos/backup.windows/Public/Music | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/Public/Pictures/ /home/thiago/Documentos/backup.windows/Public/Pictures | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/Public/Videos/ /home/thiago/backup.windows/Public/Videos | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/thiago/Documents/ /home/thiago/Documentos/backup.windows/thiago/Documents | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/thiago/Music/ /home/thiago/Documentos/backup.windows/thiago/Music | |
rsync -vazu --delete --progress /media/windows/Documents\ and\ Settings/thiago/Pictures/ /home/thiago/Documentos/backup.windows/thiago/Pictures | |
rsync -vazu --delete --progress /media |
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
SELECT first_letter FROM (SELECT DISTINCT SUBSTR(nome,0,1) as first_letter FROM PESSOAS) WHERE first_letter IN('A','B', 'C') ORDER BY first_letter | |
-- É bom fazer um link extra para buscar por nomes que não comecem por nenhuma das letras incluídas no IN. |
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
{ | |
"auto_match_enabled": false, | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"word_wrap": "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
{ | |
"installed_packages": | |
[ | |
"2pdf", | |
"AdvancedNewFile", | |
"Alignment", | |
"AutoFileName", | |
"BracketHighlighter", | |
"Clipboard History", | |
"Comment-Snippets", |