Skip to content

Instantly share code, notes, and snippets.

View thiagosf's full-sized avatar
🏠
Always working at home

Thiago Silva Ferreira thiagosf

🏠
Always working at home
View GitHub Profile
@thiagosf
thiagosf / script.sh
Last active March 19, 2016 18:36
Script para instalar no vagrant ambiente Python + Postgres
# ================================
# Atualiza sistema
# ================================
sudo apt-get install git -y
# ================================
# Pyenv
# ================================
git clone https://github.com/yyuu/pyenv.git ~/.pyenv
@thiagosf
thiagosf / bash_profile
Last active March 20, 2016 18:21
Meu bash_profile do vagrant
# Atalhos gerais
alias nge='sudo nginx -c /etc/nginx/nginx.conf -t'
alias ngr='sudo service nginx restart'
# Atalhos para GIT
alias gs='git status'
alias ga='git add .'
alias gpo='git push origin master'
alias gpoo='git push upstream master'
alias gpw='git push web master'
@thiagosf
thiagosf / killport.sh
Created March 24, 2016 13:28
Finaliza processo através da porta #notes
sudo kill `sudo lsof -t -i:9001`
@thiagosf
thiagosf / start-strider.sh
Last active March 24, 2016 13:40
Inicia Strider-CD
NODE_ENV=production SERVER_NAME=http://domain.com HOST=127.0.0.1 PORT=3000 forever start bin/strider
@thiagosf
thiagosf / swap-ubuntu.md
Created March 24, 2016 21:56
Passos para criar partição Swap no Ubuntu (especialmente para Digital Ocean)

Create SWAP Space on Ubuntu

To see if you have a swap files:

sudo swapon -s

No swap file shown? Check how much disk space space you have:

@thiagosf
thiagosf / directories-size.sh
Created March 28, 2016 11:49
Retorna lista dos diretórios com o tamanho de cada ordenando pelo maior #notes
du -h --max-depth=1 | sort -hr
@thiagosf
thiagosf / svn-wp-plugin.md
Last active July 10, 2019 17:55
Procedimento para atualizar repositório SVN com plugin WordPress

Procedimento para atualizar repositório SVN com plugin WordPress

Os comandos abaixo foram utilizados no Ubuntu. Todas informações abaixo foram retiradas do site oficial do WordPress https://wordpress.org/plugins/about/svn/

Puxe as atualizações do repositório remoto

svn up

Adicione ou altere os arquivos dentro do diretório trunk

@thiagosf
thiagosf / login.md
Created April 10, 2016 17:33
Tentativas de login no SSH #notes

Linux – See all failed SSH login attempts

View all failed login attempts

cat /var/log/secure | grep 'sshd.*Invalid'

View all successful logins

@thiagosf
thiagosf / compress.sh
Last active May 5, 2016 16:07
Comprimi imagem com ImageMagick #notes
convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% source.jpg result.jpg
@thiagosf
thiagosf / certbot.md
Last active September 17, 2016 20:16
Passos para novo certificado do https://certbot.eff.org