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
#!/bin/bash | |
# Credits by http://blog.doismellburning.co.uk/2013/01/19/upgrading-puppet-in-vagrant-boxes/ | |
apt-get install --yes lsb-release | |
DISTRIB_CODENAME=$(lsb_release --codename --short) | |
DEB="puppetlabs-release-${DISTRIB_CODENAME}.deb" | |
DEB_PROVIDES="/etc/apt/sources.list.d/puppetlabs.list" # Assume that this file's existence means we have the Puppet Labs repo added | |
if [ ! -e $DEB_PROVIDES ] |
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
alias f='foreman start -f Procfile.dev' | |
alias c='rails c' | |
alias s='rails s -b 0.0.0.0' | |
alias bi='bundle install' | |
alias igh='echo "vagrant ssh -c \'su - admin -c cd /var/apps/$(basename $(pwd))/ && rake db:create && rake db:migrate && rspec --format progress && rubocop\'" > test-hook.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
-> OUTROS | |
u -> Desfazer | |
-> Recortar | |
dd -> Recorta a linha que o cursor esta posicionado; | |
-> Copiar | |
yy -> Copia a linha que o cursor esta posicionado; | |
-> JANELAS |
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
Configurando terminal com 2 contas no Bitbucket | |
# Gerar a chave privada que acessará a conta A | |
ssh-keygen -f ~/.ssh/chave_a -C "<<seu-email-conta-a>>" | |
# Gerar a chave privada que acessará a conta B | |
ssh-keygen -f ~/.ssh/chave_b -C "<<seu-email-conta-b>>" | |
#Criar um arquivo pra orquestrar as chaves de acordo com alias | |
vim ~/.ssh/config |
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
# Criando um usuario admin no Postgresql | |
sudo -i -u postgres | |
createuser --superuser admin | |
# Configurando o charset do banco de dados | |
psql | |
UPDATE pg_database SET datallowconn = TRUE where datname = 'template0'; | |
\c template0 | |
UPDATE pg_database SET datistemplate = FALSE where datname = 'template1'; | |
drop database template1; |
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 plugin -> Plugin para habilitar o Git no Jenkins | |
Config File Provider Plugin -> Plugin que permite criar arquivos de configuração na workspace do projeto com o Jenkins | |
Android Emulator Plugin -> Plugin que gerencia os SDK's do Android, executa emuladores e monkey tests. |
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
# Update all packages | |
sudo apt-get update | |
# Upgrade all packages | |
sudo apt-get upgrade | |
# List all routes | |
sudo route -n | |
# Add default route to 192.168.1.1 |
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
#!/bin/bash | |
# where to store the sparse-image | |
WORKSPACE=~/Documents/workspace.dmg.sparseimage | |
create() { | |
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 100g -volname workspace ${WORKSPACE} | |
} | |
detach() { |
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
===================================================================================== | |
Atalhos | |
===================================================================================== | |
command + 1 = Abre / fecha os arquivos do projeto | |
shift + esc = Sai de qualquer janela secundária | |
command + ] = Avança na navegaçao do código | |
command + [ = Volta na navegação do código | |
ctrl + shift + R = Executa o teste onde o cursor estiver |