This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/__NAME__/.oh-my-zsh | |
export XDEBUG_CONFIG="idekey=VSCODE" | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
# Uncomment the following line if you want to change the command execution time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs docker rmi | |
# remove unused volumes: | |
docker volume ls -qf dangling=true | xargs docker volume rm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'default' => 'accounts', | |
'migrations' => 'migrations', | |
'connections' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This file is stored here: ~/.githooks/pre-commit | |
# Makesure the file is executable: chmod +x ~/.githooks/pre-commit | |
# Needs: git config --global core.hooksPath ~/.githooks | |
# Needs phpcbf installed (this command installs globally): composer global require squizlabs/php_codesniffer | |
# Redirect output to stderr and allow user input | |
exec 1>&2 | |
exec < /dev/tty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tars then deletes the NGINX file, /var/www/directory and mysql DB for $DOMAIN passed in first argument e.g | |
# sudo bash remove.sh domain.co.uk | |
# needs /root/.my.conf set up with [client] root user and password to create DB | |
# MAKESURE /root/backup/ exists before running this, haha. | |
DOMAIN=$1 | |
mysqldump ${DOMAIN//[^a-zA-Z_-]/_} > /root/backup/${DOMAIN}/db/${DOMAIN//[^a-zA-Z_-]/_} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace all mentions of :domain with your domain with the following command: | |
# sed -i "s/:domain/${DOMAIN}/g" /etc/nginx/sites-available/${DOMAIN} | |
server { | |
root /var/www/:domain/public; | |
index index.php index.html index.htm; | |
server_name :domain www.:domain; | |
location / { | |
try_files $uri $uri/ /index.php?args; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a NGINX file, index.php and mysql DB for $DOMAIN passed in first argument e.g | |
# sudo bash create.sh domain.co.uk | |
# needs /root/.my.conf set up with [client] root user and password to create DB | |
# needs certbot installed to do certbot | |
DOMAIN=$1 | |
cp /etc/nginx/sites-available/basic /etc/nginx/sites-available/${DOMAIN} | |
sed -i "s/:domain/${DOMAIN}/g" /etc/nginx/sites-available/${DOMAIN} | |
ln -s /etc/nginx/sites-available/${DOMAIN} /etc/nginx/sites-enabled/${DOMAIN} |
NewerOlder