Skip to content

Instantly share code, notes, and snippets.


Cid Lopes supercid

View GitHub Profile
supercid / phpcs_pre-commit
Created Dec 31, 2018
Run phpcs and phpcbf on all staged files before a commit is made
View phpcs_pre-commit
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"`
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php`
# Determine if a file list is passed
if [ "$#" -eq 1 ]
supercid /
Last active Oct 15, 2019

Install CTOP

wget -O /usr/local/bin/ctop
chmod +x /usr/local/bin/ctop

Get IP host machine with:

hostname -I | awk '{print $1}' I'm using debian-host on /etc/hosts inside the docker container

supercid / pre-commit
Last active Sep 25, 2019
Run m2 checks before commit
View pre-commit
export PATH=/usr/local/bin:$PATH
ROOT=`git rev-parse --show-toplevel`
if [ ! -d "$ROOT/vendor" ]; then
echo "Run composer install to run checkstyles"
exit 1
supercid / .zshrc
Last active Jun 12, 2019
My zshrc config
View .zshrc
export PATH=$HOME/bin:/usr/local/bin:$PATH
source <(antibody init)
# Path to your oh-my-zsh installation.
export ZSH=/Users/alcidemar/.oh-my-zsh
#export NVM_DIR="$HOME/.nvm"
#. "/usr/local/opt/nvm/"
# The shit above slows down the shell by 3 seconds! Load manually when needed
alias loadnvm=". /usr/local/opt/nvm/"

Terminal Tips


My whole setup is now versioned in a public dotfiles repository. You can either follow this guide and install everything manually, however i do recommend that you fork the repo and tweak with your own preferences.


supercid /
Created Mar 27, 2019 — forked from brandonb927/
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
supercid / tmux.conf
Last active Mar 15, 2019 — forked from rajanand02/tmux.conf
Tmux configurations with status bar theme
View tmux.conf
# set prefix to control-f
set -g prefix C-f
#unbind system defined prefix
unbind C-b
# helps in faster key repetition
set -sg escape-time 0
# start session number from 1 rather than 0
View profiler.php


This is a simple PHP profiler based on syslog and ticks.

Killer feature is that it doesn't need to be included inside statements but only prepend your scripts.

supercid / git-fav-aliases
Created Dec 31, 2018
git most used aliases
View git-fav-aliases
gaa='git add --all'
gfo='git fetch origin'
gb='git branch'
gcb='git checkout -b'
gbnm='git branch --no-merged'
glgga='git log --graph --decorate --all'
gss='git status -s'
gup='git pull --rebase'
gupv='git pull --rebase -v'
gwch='git whatchanged -p --abbrev-commit --pretty=medium'
View iterm2_profile.json
"Ansi 6 Color" : {
"Green Component" : 0.72156862745098038,
"Blue Component" : 0.71764705882352942,
"Red Component" : 0.75686274509803919
"Tags" : [
"Ansi 12 Color" : {