Skip to content

Instantly share code, notes, and snippets.

View supercid's full-sized avatar

Cid Lopes supercid

View GitHub Profile
@supercid
supercid / .zshrc
Last active June 12, 2019 10:57
My zshrc config
export PATH=$HOME/bin:/usr/local/bin:$PATH
source <(antibody init)
PATH="/Users/alcidemar/Library/Python/2.7/bin:${PATH}"
# Path to your oh-my-zsh installation.
export ZSH=/Users/alcidemar/.oh-my-zsh
#export NVM_DIR="$HOME/.nvm"
#. "/usr/local/opt/nvm/nvm.sh"
# The shit above slows down the shell by 3 seconds! Load manually when needed
alias loadnvm=". /usr/local/opt/nvm/nvm.sh"
@supercid
supercid / pre-commit
Last active September 25, 2019 10:44
Run m2 checks before commit
#!/bin/sh
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
fi
@supercid
supercid / reminders.md
Last active October 15, 2019 07:29
PerfTestReminders

Install CTOP

wget https://github.com/bcicen/ctop/releases/download/v0.7.2/ctop-0.7.2-linux-amd64 -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
supercid / installshopware.sh
Last active March 31, 2022 12:34
Shopware Local Install Script
#!/bin/bash
cd ~/Sites
composer create-project shopware/composer-project --no-interaction --stability=dev shopware
cd shopware
MYSQL_ENV_MYSQL_HOST='mysql'
# Setup variables to populate the .env file
cp .env.example .env
sed -i -e 's*DB_DATABASE=composer*DB_DATABASE=shopware*g' .env
sed -i -e 's*DB_USERNAME=root*DB_USERNAME=homestead*g' .env
@supercid
supercid / phpcs_pre-commit
Created December 31, 2018 09:39
Run phpcs and phpcbf on all staged files before a commit is made
#!/bin/sh
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 ]
then
oIFS=$IFS
IFS='