Função | Retorno | Variável dentro do escopo | Uso |
---|---|---|---|
Let | Unit/Lambda* | it |
Funções com chamadas encadeadas e checagem de objetos nulos |
Run | Unit/Lambda* | this |
Inicialização do objeto e o cálculo do valor de retorno |
With | Unit/Lambda* | this |
Executar funções no objeto dentro de um contexto. |
Apply | Objeto | this |
Inicializar e configurar um objeto |
Also | Objeto | it |
Ações adicionais que não alteram o objeto |
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
#Para quem tem que deletar muita msg das dead_queue, | |
#e tem que selecionar uma a uma quais msg deseja excluir. | |
#Seus problemas acabaram! abra a fila clique em visualizar e buscar e no console cole isso: | |
function find_and_delete(to_find){ | |
$("div[style='overflow:hidden;white-space:nowrap;']").each(function( index ) { | |
var text_to_validate = $(this).text() | |
var n = text_to_validate.search(to_find); | |
if (n > 0){ |
A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
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 clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
or these commands for Mac | |
brew update | |
brew install pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc |
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
https://atom.io/packages/file-icons | |
https://atom.io/packages/minimap | |
https://atom.io/packages/linter | |
https://atom.io/packages/busy-signal | |
https://atom.io/packages/highlight-selected | |
https://atom.io/packages/sublime-style-column-selection | |
https://atom.io/packages/terminus | |
https://atom.io/packages/rainbow-csv |
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
# Dist .sh initial | |
sudo apt-get install curl build-essential openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison | |
# get rvm | |
curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
curl -L https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm requirements | |
# install last ruby version |
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
#set where virutal environments will live | |
export WORKON_HOME=$HOME/.Envs | |
# ensure all new environments are isolated from the site-packages directory | |
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' | |
# use the same directory for virtualenvs as virtualenvwrapper | |
export PIP_VIRTUALENV_BASE=$WORKON_HOME | |
# makes pip detect an active virtualenv and install to it | |
export PIP_RESPECT_VIRTUALENV=true | |
if [[ -r /usr/local/bin/virtualenvwrapper.sh ]]; then | |
source /usr/local/bin/virtualenvwrapper.sh |
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
... | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'console': { | |
'class': 'logging.StreamHandler', | |
}, | |
}, |
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
mysql> desc produtos_produto; | |
+--------------+---------------+------+-----+---------+----------------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+--------------+---------------+------+-----+---------+----------------+ | |
| id | int(11) | NO | PRI | NULL | auto_increment | | |
| nome | varchar(128) | NO | | NULL | | | |
| valor | decimal(10,2) | YES | | NULL | | | |
| categoria_id | int(11) | NO | MUL | NULL | | | |
+--------------+---------------+------+-----+---------+----------------+ |
NewerOlder