Skip to content

Instantly share code, notes, and snippets.

View vitorbritto's full-sized avatar
🏠
Working from home

Vitor Britto vitorbritto

🏠
Working from home
View GitHub Profile
@vitorbritto
vitorbritto / add_mysql_brew.md
Created January 24, 2015 17:10
Install MySQL with HomeBrew

Install MySQL with HomeBrew

# Installing MySQL

brew install -v mysql

# Setting up MySQL

# Copy the default my-default.cnf file to the MySQL Homebrew Cellar

directory where it will be loaded on application start:

@vitorbritto
vitorbritto / setup_vitorbritto_workspace.md
Last active June 22, 2019 02:48
My Workspace Setup

Setup - My Workspace

This is my workspace reference documentation in case I need to install and prepare it again. Is up to you (me) if you want to run this step by step. Use it wiselly. =]

1. Backup

  • Desktop
  • Projects
  • Transfers
  • Documents
@vitorbritto
vitorbritto / makefile
Created July 6, 2016 12:47
Using makefile to run automated tasks
# MAKEFILE
#
# Autor: Vitor Britto
# Versão: 0.1.0
#
#
# Descrição:
# Arquivo para gerar um estrutura inicial para
# novos projetos e realizar tarefas de automação
#
@vitorbritto
vitorbritto / static_webserver.sh
Created April 6, 2014 03:03
Bash function to initialise a static web server with Python or PHP
# ----------------------------------------------------------------------
# Start an HTTP server from a directory, optionally specifying the port
# ----------------------------------------------------------------------
pyserver() {
local port="${1:-8000}"
sleep 1 && open "http://localhost:${port}/" &
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
@vitorbritto
vitorbritto / vscode-settings.json
Created June 22, 2021 16:56
My VS Code Settings
{
"explorer.confirmDelete": false,
"window.zoomLevel": -2,
"guides.enabled": false,
"explorer.confirmDragAndDrop": false,
"[json]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"[html]": {
"editor.defaultFormatter": "HookyQR.beautify"
@vitorbritto
vitorbritto / postgres-brew.md
Created September 10, 2021 02:36 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@vitorbritto
vitorbritto / install.sh
Last active January 22, 2022 03:19
Shell Script - Este é um script shell básico para clonar um repositório no GitHub e executar comandos de estruturação para um projeto com Bower e Grunt.
# Executar no shell/bash com: bash install.sh
# ------------------------------------------------------------------------------
# | Helpers |
# ------------------------------------------------------------------------------
# Renderiza um log de informação
e_informa() {
printf "\n$(tput setaf 7)%s$(tput sgr0)\n" "$@"
@vitorbritto
vitorbritto / keybase.md
Created April 5, 2022 15:12
Keybase Proof

Keybase proof

I hereby claim:

  • I am vitorbritto on github.
  • I am vitorbritto (https://keybase.io/vitorbritto) on keybase.
  • I have a public key ASAlgVIS18Rhy8It_4saeW-NLIB-VYoiFZeTPYSjz6M9qQo

To claim this, I am signing this object:

@vitorbritto
vitorbritto / vim.md
Last active January 20, 2023 09:26
Vim Commands Cheat Sheet

Vim Commands Cheat Sheet

How to Exit

Command Description
:q[uit] Quit Vim. This fails when changes have been made.
:q[uit]! Quit without writing.
:cq[uit] Quit always, without writing.