- 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: phil@phil-cook.com | |
# Twitter: @p_cook | |
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
brew_array=("5.6","7.0","7.1","7.2") | |
php_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2") | |
valet_support_php_version_array=("php@5.6" "php@7.0" "php@7.1" "php@7.2") | |
php_installed_array=() |
function getFileMd5 ( file ) { | |
var dfd = jQuery.Deferred(); | |
/** | |
* reference: | |
* https://github.com/satazor/SparkMD5 | |
*/ | |
var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice, | |
chunkSize = 2097152, // Read in chunks of 2MB | |
chunks = Math.ceil(file.size / chunkSize), | |
currentChunk = 0, |
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(); |