Skip to content

Instantly share code, notes, and snippets.

View SebKay's full-sized avatar

Seb Kay SebKay

View GitHub Profile
docker exec -it [ID] bash
docker stop $(docker ps -a -q)
# Display the SSH key
cat ~/.ssh/id_rsa.pub
@SebKay
SebKay / phpcs-validate.sh
Last active May 15, 2020 06:17
Check project against PRS2
# Install PHP_CodeSniffer
composer require squizlabs/php_codesniffer
# Run script
./vendor/bin/phpcs ./ --extensions=php --standard=PSR2 --ignore=vendor/
@SebKay
SebKay / lets-encrypt-ssl-simple.sh
Last active May 15, 2020 06:15
Install SSL Certificate
sudo certbot --apache -d DOMAIN -d www.DOMAIN
# Useful if you change from password login to SSH auth
# Here's where you woud turn SSH auth on and off /etc/ssh/sshd_config
systemctl restart sshd
@SebKay
SebKay / clean-git.sh
Last active June 1, 2020 13:30
Remove an files not tracked by Git
# -f Forces "git clean" to run
# -x Removes .gitignore files if present
# -d Makes it run recursively in directories
git clean -xffd
@SebKay
SebKay / install-gulp-cli.sh
Created October 8, 2019 13:10
Install gulp CLI tool
# Install gulp CLI tool
yarn global add gulp-cli
# Very the version
gulp --version
@SebKay
SebKay / install-yarn-cli.sh
Last active October 8, 2019 13:11
Install Yarn CLI tool
# Grab installer via CURL and run
curl -o- -L https://yarnpkg.com/install.sh | bash
# Verify the version
yarn --version
@SebKay
SebKay / install-composer.sh
Last active October 8, 2019 13:04
Install Composer globally
# Download composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
# Run the installer
php composer-setup.php
mv composer.phar /usr/local/bin/composer
# Remove the installer
php -r "unlink('composer-setup.php');"