Skip to content

Instantly share code, notes, and snippets.

View nascimento's full-sized avatar

Vitor Nascimento nascimento

View GitHub Profile
# Command
shasum -a 256 /path/to/file | cut -c-12
# Example:
> shasum -a 256 ~/Desktop/Python-3.4.0.tgz | cut -c-12 (master⚡)
d2c83ea02177
# learned in: https://coderwall.com/p/bbfjrw/calculate-checksum-for-chef-s-remote_file-resource
@nascimento
nascimento / rbenv-howto.md
Created March 23, 2016 21:12 — forked from samukasmk/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@nascimento
nascimento / tuneis_ssh.sh
Created October 22, 2015 19:27 — forked from samukasmk/tuneis_ssh.sh
Exemplos de Tuneis SSH
### TUNEL DE ACESSO A UMA PORTA REMOTA, COMO SE FOSSE LOCAL
ssh -f <USUARIO>@<IP DA MAQUINA SSH> -L <PORTA LOCAL>:localhost:<PORTA REMOTA> -N
# Ex: TUDO QUE FOR PARA MINHA PORTA LOCAL 18080, SERA DIRECIONADO A PORTA REMOTA DO SERVIDOR 8080
ssh -f samukasmk@meu_servidor.com.br -L 18080:localhost:8080 -N
### TUNEL COM NEXT HUP
ssh samukasmk@<IP SERVER PULO> -t -t -L <IP LOCAL>:<PORTA LOCAL>:localhost:<PORTA LOCAL> ssh -D <PORTA DESTINO> <USER>@<IP SERVER DESTINO>
# Ex: porta 8080 com next hup