Skip to content

Instantly share code, notes, and snippets.

View MarioRinaldi's full-sized avatar

Mario Felipe Rinaldi MarioRinaldi

View GitHub Profile
@MarioRinaldi
MarioRinaldi / .gitignore
Created November 16, 2013 15:54
.gitignore OS Generated files
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
@MarioRinaldi
MarioRinaldi / .bash_aliases
Created February 28, 2014 22:03
GIT PS1 bash prompt
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@MarioRinaldi
MarioRinaldi / .gitconfig
Last active March 27, 2020 12:24
~/.gitconfig
[user]
name = XXXX
email = YYYY
[push]
default = simple
[alias]
dev = checkout dev
prod = checkout prod
st = status
ci = commit
@MarioRinaldi
MarioRinaldi / Default (OSX).sublime-keymap
Last active March 27, 2020 12:22
Sublime Customizations
[
{ "keys": ["super+d"], "command": "duplicate_line" },
{ "keys": ["super+shift+d"], "command": "find_under_expand" },
{ "keys": ["super+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["f10"], "command": "clone_file" },
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false} },
{ "keys": ["f13"], "command": "reindent", "args": {"single_line": false} },
{ "keys": ["super+down"], "command": "sublimerge_go_down"},
{ "keys": ["super+up"], "command": "sublimerge_go_up"},
{ "keys": ["f19"], "command": "sftp_upload_file" },
GIT_VERSION=`git --version | awk '{print $3}'`
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion for git version: $GIT_VERSION..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@MarioRinaldi
MarioRinaldi / configs do ssh
Last active January 2, 2019 13:13
Configurando ssh-rsa
# no Computador cliente (remetente)
1) editar o arquivo *~/.ssh/config* e adicionar as seguintes linhas:
Host NOME_DO_SERVIDOR
Hostname IP_DO_SERVIDOR
User USUARIO_LOGADO_DO_SERVIDOR
IdentityFile CAMINHO_DA_CHAVE_RSA_PRIVADA
StrictHostKeyChecking no
2) Digitar:
ssh-keyscan -H NOME_DO_SERVIDOR >> ~/.ssh/known_hosts
@MarioRinaldi
MarioRinaldi / buildJenkins.sh
Created January 14, 2015 14:49
buildJenkins
#!/bin/bash
help()
{
echo ""
echo "buildJenkins"
echo " Ferramenta para constução de pacotes de arquivos em linha de comandos."
echo ""
echo "UTILIZAÇÃO"
echo ""
preferred_syntax = :scss
http_path = "/"
fonts_dir = "static/html_cms/fonts"
css_dir = "static/html_cms/css/assine-ja/"
sass_dir = "source/scss"
images_dir = "static/html_cms/img/assine-ja/"
if environment == :production
output_style = :compressed
line_comments = false
@MarioRinaldi
MarioRinaldi / SimpleStore.js
Created November 22, 2016 03:49 — forked from ksafranski/SimpleStore.js
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
#!/bin/bash
cd /tmp && \
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz && \
sudo mkdir -p /opt/robo3t/1.2.1/ && \
sudo tar -zxvf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz -C /opt/robo3t/1.2.1/ --strip-components=1 && \
sudo ln -s /opt/robo3t/1.2.1/bin/robo3t /usr/local/bin