sudo chown -R $USER:www-data .
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
This file contains 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
# How to install and run kubernetes locally (Ubuntu) | |
## 1. Intsall [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/) | |
## 2. Intsall [MiniKube](https://minikube.sigs.k8s.io/docs/start/) | |
## 3. Add Docker to Sudo group: | |
```bash | |
# (required) to be able to start minikube | |
$ sudo groupadd docker |
This file contains 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
{ | |
"schemaVersion": 1, | |
"label": "is it monday", | |
"message": "no", | |
"color": "orange", | |
"namedLogo": "phpmyadmin" | |
} |
This file contains 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
# Git | |
alias g='git' | |
alias gs='git status' | |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias wip="git add . && git commit -m 'wip'" | |
alias nah="git reset --hard && git clean -df" | |
# Laravel | |
alias pa='php artisan' | |
alias pam='php artisan migrate' |
This file contains 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 | |
# Check if arguments is empty domain | |
if [ $# -eq 0 ] | |
then | |
echo "No arguments supplied" | |
fi | |
domain=$1 | |
php="7.4" | |
if [ -n "$2" ] |
This file contains 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 | |
/** | |
* Plugin Name: Allow localhost http requests. | |
* Plugin URI: https://gist.github.com/saas786/a567363477df7e28b0c1df6295cadf75/ | |
* Description: Note: Please don't use it on live website. If you are working locally, sometimes you get errors such as "A valid URL was not provided" or such, specially when you are interacting with website which is also hosted locally, so it becomes annoying at times to find the cause, and most of the time its wp_safe_remote_request, wp_safe_remote_get or wp_safe_remote_post functions who are the culprit. So this plugin is a quick fix. | |
* Author: saas786 | |
* Version: 0.1 | |
*/ | |
add_filter( 'http_request_host_is_external', 'wplr_http_request_host_is_external' ); | |
function wplr_http_request_host_is_external(){ |
This file contains 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 | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |
This file contains 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
DB_CONNECTION=mysql | |
DB_HOST=db | |
DB_PORT=3306 | |
DB_DATABASE=laravel | |
DB_USERNAME=laraveluser | |
DB_PASSWORD=your_laravel_db_password |
mkdir $HOME/.ssh
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- You will then be prompted to "Enter a file in which to save the key."