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
# zip folder | |
zip -r filename.zip foldername/ | |
# unzip folder | |
unzip filename.zip -d folderdestination/ | |
# copy file from local to remote | |
scp filename.zip user@server:/path/to/filename.zip | |
# copy file from remote to local |
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
# Use this gem in your Gemfile | |
gem 'unicorn' |
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
# HELP | |
git help | |
git help config # get help for config command | |
git help commit # get help for commit command | |
# BASICS | |
git init # starts a new git repo | |
# FILES AND STAGE | |
# status |
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
# Instalar mysql para Ruby on Rails | |
sudo apt-get install libmysqlclient-dev | |
gem install mysql2 | |
# Instalar pg para Ruby on Rails | |
sudo apt-get install libpq-dev | |
gem install pg |
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
# Edita o arquivo atual do crontab ou cria um se não existir | |
crontab -e | |
# Exibe o conteúdo atual do crontab | |
crontab -l | |
# Remove o arquivo atual do crontab | |
crontab -r |
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
<?php | |
/** | |
* Twitter-API-PHP : Simple PHP wrapper for the v1.1 API | |
* | |
* PHP version 5.3.10 | |
* | |
* @category Awesomeness | |
* @package Twitter-API-PHP | |
* @author James Mallison <[email protected]> |
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
# Atualizar servidor Symfony | |
# Atualiza o repositório | |
$ svn up # ou git pull | |
# Atualiza o banco de dados | |
$ php app/console doctrine:schema:update --force | |
# Dá permissão de leitura para o app_dev.php | |
$ chmod +r web/app_dev.php |
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
# atualiza o repositório | |
git pull | |
# atualiza os bundles | |
bundle install | |
# precomplia os assets | |
RAILS_ENV=production rake assets:precompile | |
# atualiza o banco de dados |
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
# abrir o terminal do MySql | |
mysql -u root -p | |
# exportar uma tabela completa para um arquivo | |
mysqldump -p -u root nome_do_banco nome_da_tabela > nome_do_arquivo.sql | |
# rodar uma query a partir de um arquivo .sql | |
mysql -p -u root nome_do_banco < nome_do_arquivo.sql | |
# remover restrict |
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
# instalar apache | |
sudo apt-get update | |
sudo apt-get install apache2 | |
# instalar mysql | |
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql | |
# ativar mysql | |
sudo mysql_install_db | |
# configurar mysql | |
sudo /usr/bin/mysql_secure_installation |