Skip to content

Instantly share code, notes, and snippets.

View semihcosu's full-sized avatar
👨‍💻

Semih Coşu semihcosu

👨‍💻
View GitHub Profile
@semihcosu
semihcosu / aliases
Created July 6, 2018 08:59
aliases
alias art="php artisan"
alias nah='git reset --hard;git clean -df'
alias art:refresh="php artisan migrate:refresh"
alias art:refresh-seed="php artisan migrate:refresh --seed"
alias gri="git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached"
@semihcosu
semihcosu / webhost_permissions.sh
Last active April 25, 2018 21:49
Fix webhost permissions
#!/bin/bash
owner=$(whoami | awk '{print $1}')
if [ "$(whoami)" == 'root' ]; then
echo $"You shouldn't be running this as root."
exit 1;
fi
sudo find . -type d -exec chmod 0755 {} \;
@semihcosu
semihcosu / ngh
Created April 24, 2018 09:05
Nginx Virtual Host Generator
#!/bin/bash
### Set Language
TEXTDOMAIN=virtualhost
### Set default parameters
action=$1
domain=$2
rootDir=$3
owner=$(who am i | awk '{print $1}')
sitesEnable='/etc/nginx/sites-enabled/'