- Create a private key:
openssl genrsa 2048 > private-key.pem
- Create a Certificate Signing Request (CSR):
<? | |
DB::table('transactions') | |
->select( | |
'id', | |
DB::raw('meta->"$.target_units" as target_units'), | |
DB::raw('"9864a4b0-ac8a-43bc-a8cf-c10c6e2da09c" MEMBER OF(meta->"$.target_units") as hit') | |
) | |
->where('hit', true) | |
->get(); |
For security reasons, you should probably grant select, delete, update and insert to your app user in production.
Have another user who can do alter, create, drop and index when running migrations.
If you run seeders in production, also grant select, insert and references to the migration user.
Yeah, 2 users, migrations are not always run in production everyday and this keeps more secure your database.
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub | |
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA) |
#!/bin/bash | |
# Creator: Phil Cook | |
# Email: [email protected] | |
# Twitter: @p_cook | |
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
brew_array=("5.6","7.0","7.1","7.2") | |
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
php_installed_array=() |
function space_front(size, n) { | |
return size - n; | |
} | |
function space_mid(n) { | |
return (2 * n) - 3; | |
} | |
function is_top(n) { | |
return n > 1; |
<?php | |
# Exec during deployment | |
# php cloudflareWhitelistUpdate.php public/.htaccess | |
$srcUrls = [ | |
'https://www.cloudflare.com/ips-v4', | |
'https://www.cloudflare.com/ips-v6' | |
]; | |
$htacessFile = $argv[1] ?? '.htaccess'; |
(function () { | |
// Image decoders (for web workers) | |
dwv.image.decoderScripts = dicom_extenstions; | |
// base function to get elements | |
dwv.gui.getElement = dwv.gui.base.getElement; | |
dwv.gui.displayProgress = function (percent) {}; | |
// create the dwv app | |
var app = new dwv.App(); |
# To work something like | |
# php .\artisan db:seed --class=UsersTableSeeder | |
# where `UsersTableSeeder` is a newly created class on seeder file | |
# you need to execute this first | |
composer dump-autoload | |
# Reference :) | |
#http://laravel.io/forum/01-31-2015-laravel5-seeder-reflectionexception-class-tableseeder-does-not-exist-in-illuminatecontainercontainerphp776 | |
# You should never forget, even when it sounds dummy to dump the autoload files with the command "composer dump-autoload" to make the seeders work properly. |