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 / devlist-bookmarks.md
Last active October 10, 2023 13:49
A BADASS list for faster Web Development! Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

@vitorbritto
vitorbritto / responsive-test.md
Last active December 20, 2015 17:39
Teste para projetos responsivos - Método para capturar telas utilizando o PhantomJS.

Teste para projetos responsivos

Problema

Testar/verificar a disposição dos elementos de uma determinada página em determinadas resoluções de tela.

Solução

Executar captura de telas de acordo com os viewports definidos em um script, com a ajuda do PhantomJS.

Necessário ter o NodeJS instalado.

@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 / 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 / bash_functions
Created February 11, 2014 00:07
dotfiles - bash functions
#!/bin/bash
#
# General
# ---------------------------------------------------
# Create a data URI from a file
datauri() {
local mimeType=""
@vitorbritto
vitorbritto / bash_alias
Last active August 30, 2023 09:03
dotfiles - bash alias
#!/bin/bash
# ------------------------------------------------------------------------------
# | System |
# ------------------------------------------------------------------------------
# Navigation
# -------------------
@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.
@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 / commands.md
Last active June 9, 2016 12:44
Unix References

Unix Commands

Environment Control

cd d                         Change to directory d
mkdir d                      Create new directory d
rmdir d                      Remove directory d
mv f1 [f2...] d              Move file f to directory d
mv d1 d2                     Rename directory d1 as d2

passwd Change password

@vitorbritto
vitorbritto / regex.md
Last active December 2, 2024 16:06
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping