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
[ | |
{"nome" : "Abadia de Goiás, Goiás", "slug" : "abadia de goias, goias", "uf" : "Goiás"}, | |
{"nome" : "Abadia dos Dourados, Minas Gerais", "slug" : "abadia dos dourados, minas gerais", "uf" : "Minas Gerais"}, | |
{"nome" : "Abadiânia, Goiás", "slug" : "abadiania, goias", "uf" : "Goiás"}, | |
{"nome" : "Abaeté, Minas Gerais", "slug" : "abaete, minas gerais", "uf" : "Minas Gerais"}, | |
{"nome" : "Abaetetuba, Pará", "slug" : "abaetetuba, para", "uf" : "Pará"}, | |
{"nome" : "Abaiara, Ceará", "slug" : "abaiara, ceara", "uf" : "Ceará"}, | |
{"nome" : "Abaíra, Bahia", "slug" : "abaira, bahia", "uf" : "Bahia"}, | |
{"nome" : "Abaré, Bahia", "slug" : "abare, bahia", "uf" : "Bahia"}, | |
{"nome" : "Abatiá, Paraná", "slug" : "abatia, parana", "uf" : "Paraná"}, |
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
// send to current request socket client | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.sockets.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
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
# emulate bash PROMPT_COMMAND (only for zsh) | |
precmd() { eval "$PROMPT_COMMAND" } | |
# open new terminal in same dir | |
PROMPT_COMMAND='pwd > "${HOME}/.cwd"' | |
[[ -f "${HOME}/.cwd" ]] && cd "$(< ${HOME}/.cwd)" |
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
for i in *; do sum=$(echo -n "$i"|md5sum); mv "$i" "${sum%% *}.${i##*.}"; done |
OlderNewer