sudo chmod -R ugo+rw path
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 | |
php_new_version=$1 | |
if [ -z "$php_new_version" ] | |
then | |
echo "Please enter which PHP version do you want to switch to." | |
exit 1 | |
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
import argparse | |
import subprocess | |
import time | |
from watchdog.events import FileSystemEventHandler | |
from watchdog.observers import Observer | |
''' | |
Watch - A simple script to watch for changes in a python file and run it. | |
Usage: python watch.py [script_file] |
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 | |
// UserViewModel.php | |
class UserViewModel extends ViewModel | |
{ | |
public User $user; | |
public function __construct(User $user) | |
{ | |
$this->user = $user; |
This is an extended version of the tags example in the alpine.js
repository with `Bootstrap5.
My implementation is a bit comprehensive with the following features:
- It doen't allow duplicate tags
- Adding duplicate tag would throw a nice error
- All tags can be cleared at once
- It will prompt when clearing all tags
Here's the demo https://imgur.com/KGf95Fa
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
name: CD | |
on: | |
release: | |
types: | |
- released | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
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 | |
Green='\033[1;32m' | |
Red='\033[0;31m' | |
NC='\033[0m' # No Color | |
Yellow='\033[0;33m' | |
should_bump=true | |
bump_major() |
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 | |
/** | |
* | |
* @link https://github.com/codex-team/editor.js/issues/676#issuecomment-587462314 | |
*/ | |
namespace App\Traits; | |
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 | |
#Get Version | |
version() { | |
git ls-remote --tags $1 | awk -F/ '{ print $3 }' | tail -n1 | |
} | |
# Get commit hash | |
hash() { | |
git ls-remote --tags $1 | awk -F/ '{ print substr($1,0,7) }' | tail -n1 | |
} |
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
source ~/.dotfiles/.aliases_projects | |
alias art='php artisan' | |
alias arts='art serve' | |
alias artm='art migrate' | |
alias artms='art migrate:refresh --seed' | |
alias artrl='art route:list' | |
alias artclear='art clear-compiled && | |
art view:clear && | |
art config:clear && | |
art route:clear && |
NewerOlder