Skip to content

Instantly share code, notes, and snippets.

View rjp2525's full-sized avatar
:octocat:
trying to quit vim

Reno Philibert rjp2525

:octocat:
trying to quit vim
View GitHub Profile
@rjp2525
rjp2525 / 0_notes.md
Created January 3, 2024 19:47
Issue workaround for multi-tenancy, multi-database testing with stancl/tenancy

Notes for the log locations

The "Creating MySQL database" is logged from the \Stancl\Tenancy\TenantDatabaseManagers\MySQLDatabaseManager::createDatabase() method:

public function createDatabase(TenantWithDatabase $tenant): bool
{
    $database = $tenant->database()->getName();
    $charset = $this->database()->getConfig('charset');
    $collation = $this->database()->getConfig('collation');
@rjp2525
rjp2525 / fix-zsh.sh
Created January 16, 2022 19:16
Fix and recover zsh: corrupt history file /home/…/.zsh_history error
cd ~
mv .zsh_history .zsh_history_old
strings .zsh_history_old > .zsh_history
fc -R .zsh_history
@rjp2525
rjp2525 / deploy.sh
Created January 8, 2022 18:58
Laravel Forge Deployment Script
# Switch to the project directory
cd $FORGE_SITE_PATH
# Enable maintenance mode while deploying
$FORGE_PHP artisan down --render="errors::503" --redirect="/" || true
# Pull in the configured Forge deployment branch from GitHub (usually "main")
git pull origin $FORGE_SITE_BRANCH
# Install the project (production does not require development dependencies)
@rjp2525
rjp2525 / keybase.md
Created September 27, 2016 05:20
Keybase Proof

Keybase proof

I hereby claim:

  • I am rjp2525 on github.
  • I am renophilibert (https://keybase.io/renophilibert) on keybase.
  • I have a public key whose fingerprint is 361D 11B9 4770 4ECE 8089 D708 C682 2C06 893B 92E1

To claim this, I am signing this object:

B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 100,
// circle full layer at bottom
B0000,B0000,B0100,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B0000,B0110,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B0010,B0110,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B0110,B0110,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B1110,B0110,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B1110,B1110,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
B0000,B1110,B1110,B1000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, B0000,B0000,B0000,B0000, 20,
<?php
/* app/validators.php */
Validator::extend('alpha_spaces', function($attribute, $value)
{
return preg_match('/^[\pL\s]+$/u', $value);
});
/*