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
\Cache::macro('forgetPrefix', function ($prefix) { | |
// if cache store is redis | |
if (config('cache.default') !== 'redis') { | |
\Log::warning('Cache clear attempted on non-redis cache store'); | |
return; | |
} | |
$connection = \Illuminate\Support\Facades\Redis::connection(config('cache.stores.redis.connection')); | |
$client = $connection->client(); | |
$client_prefix = config('cache.prefix'); |
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 | |
namespace App\Support; | |
class Currency | |
{ | |
/** | |
* Required base currency | |
* | |
* @var null |
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
Add middleware: | |
... | |
'mynova' => [ | |
'web', | |
Authenticate::class, | |
DispatchServingNovaEvent::class, | |
BootTools::class, | |
Authorize::class, | |
] |
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 | |
Y=$(date +%Y) | |
M=$(date +%m) | |
echo "checking login files last modified: $Y-$M-" | |
ls --full-time /home/*/public_html/admin/controller/common/login.php | grep '$Y-$M-' | |
echo "checking payment files last modified: $Y-$M-" | |
ls --full-time /home/*/public_html/catalog/controller/payment/* | grep '$Y-$M-' |
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
add_action( 'init', function() { | |
if ( isset( $_GET['do_write_test'] ) && $_GET['do_write_test'] == '1') { | |
// Login | |
wp_set_current_user(1); | |
wp_set_auth_cookie(1, false, true); | |
// Include Filesystem | |
require_once(ABSPATH . 'wp-admin/includes/file.php'); | |
\WP_Filesystem(); | |
global $wp_filesystem; |
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 | |
class Session { | |
public $data = array(); | |
public function __construct() { | |
$this->data = new SessionData(); | |
} | |
function getId() { | |
return $this->data->getId(); |