Skip to content

Instantly share code, notes, and snippets.

View dibmartins's full-sized avatar
🎯
Focusing

Diego Botelho dibmartins

🎯
Focusing
View GitHub Profile
git fetch --all
git reset --hard
git pull origin <your_branch>
git stash save --keep-index --include-untracked
# Apagar arquivos que não monitorados:
git clean -df
Listar commits:
git log --pretty=oneline
git log --pretty=format:"%h - %an, %ar : %s"
Ir para um commit específico:
git reset --hard 33145a2d8e2d767ec7a8e04d46e2926883c02d99
@dibmartins
dibmartins / convert-putty-ppk-to-pub
Created February 9, 2017 12:31
convert-putty-ppk-to-pub
sudo apt-get install putty-tools
puttygen id_dsa.ppk -O private-openssh -o id_dsa
puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub
mkdir -p ~/.ssh
mv -i ~/id_dsa* ~/.ssh
chmod 600 ~/.ssh/id_dsa
chmod 666 ~/.ssh/id_dsa.pub
chmod 666 ~/.ssh/known_hosts
@dibmartins
dibmartins / install-git-kraken-ubuntu
Last active March 22, 2023 11:52
install-git-kraken-ubuntu
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
sudo dpkg -i gitkraken-amd64.deb
@dibmartins
dibmartins / install-composer-ubuntu
Created February 8, 2017 18:17
install-composer-ubuntu
sudo apt-get update
sudo apt-get install curl
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@dibmartins
dibmartins / install-php-7-ubuntu
Created February 8, 2017 18:07
install-php-7-ubuntu
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get purge php5-fpm -y
sudo apt-get install php7.0 php7.0-fpm
sudo apt-get install php7.0-mysql -y
sudo apt-get --purge autoremove -y
php --version
@dibmartins
dibmartins / install-workbench-ubuntu-xenial
Created February 8, 2017 17:20
install-workbench-ubuntu-xenial
wget http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-6.3.8-1ubu1604-amd64.deb -O mysql-workbench-community.deb
sudo dpkg -i mysql-workbench-community.deb
sudo apt-get -f install
@dibmartins
dibmartins / system-version
Created February 8, 2017 17:16
system-version
lsb_release -rs
@dibmartins
dibmartins / install-visual-studio-code-ubuntu
Created February 8, 2017 16:45
install-visual-studio-code-ubuntu
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake ide visual-studio-code
@dibmartins
dibmartins / install-docker-ubuntu-xenial
Last active February 9, 2017 11:25
install-docker-ubuntu-xenial
// Install Docker Compose
sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
apt-cache policy docker-engine
sudo apt-get install -y docker-engine
// Check that it's running:
sudo systemctl status docker