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 | |
while : | |
do | |
eject | |
eject -t | |
done |
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/sh | |
echo "committing as $(git config user.name) ($(git config user.email))", | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
#STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep "app/.*\.php"` | |
PROJECT_PATH=`php -r "echo dirname(dirname(realpath('$0')));"` | |
VENDOR_BIN_DIR="${PROJECT_PATH}/vendor/bin/"; |
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 | |
namespace App\Enums; | |
use App\Rules\IsValidEnum; | |
use Illuminate\Support\Str; | |
abstract class BaseEnum | |
{ | |
protected $name; | |
protected $values = array(); |
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 | |
function incrementDeep(&$array, $value) { | |
$array += $value; | |
} | |
$test['foo']['bar']['test'] = 5; | |
incrementDeep($test['foo']['bar']['test'], 5); | |
incrementDeep($test['foo']['bar']['test2'], 5); |
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
# This might ruin your database and I do not take any responsibility for that. Backup your database before continuing | |
! | |
# Check the results throughly | |
SELECT * FROM `wp_postmeta` | |
WHERE `meta_key` IN | |
( SELECT TRIM(LEADING '_' FROM `meta_key`) AS mk | |
FROM `wp_postmeta` | |
WHERE `meta_value` regexp '^field_[0-9a-f]+' | |
AND `meta_value` NOT IN |
OlderNewer