As of this day, this is probably the only and fastest way of installing it.
Based from the GDAL and PROJ build requirements, here is the full list of required packages to install:
var cluster = require('cluster'); | |
if (cluster.isMaster) { | |
for (var i = 0; i < 4; ++i) { | |
cluster.fork(); | |
} | |
} else { | |
console.log(process.pid, cluster.worker.id); | |
} |
This is a simple way of importing MySQL database in Docker.
In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.
Put the exported sql file in the shared folder.
Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash
.
Login to MySQL via mysql -u USERNAME -p
.
/** | |
* Validates hex value | |
* @param {String} color hex color value | |
* @return {Boolean} | |
*/ | |
function isValidHex(color) { | |
if(!color || typeof color !== 'string') return false; | |
// Validate hex values | |
if(color.substring(0, 1) === '#') color = color.substring(1); |
<?php | |
namespace App\Providers\Passwords; | |
use Illuminate\Auth\Passwords\DatabaseTokenRepository; | |
class MyDatabaseTokenRepository extends DatabaseTokenRepository | |
{ | |
/** | |
* [Override] |
add_action( 'gform_pre_submission_8', 'uploads_log_pre_submission' ); | |
function uploads_log_pre_submission( $form ) { | |
foreach ( $form["fields"] as &$field ) { | |
if ( $field["type"] == "fileupload" ) { | |
$id = "input_".$field["id"]; | |
if ( $field["multipleFiles"] ) { | |
if ( empty( $_POST["gform_uploaded_files"] ) ) | |
continue; |
function slugify(value) { | |
/* | |
* Convert the the vs in a range of cells into slugs. | |
*/ | |
slug = ''; | |
slug = value.substring(0, 30).toLowerCase(); | |
slug = slug.replace(/[^\w\s-]/g, ''); | |
slug = slug.replace(/\s+/g, '-'); | |
Logger.log(slug); |
This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
# | A | B | C |
---|---|---|---|
1 | a | b | slug |
2 | foo | baz bing | =slugify(A2:B4) |
3 | bar | BAZ | |
4 | FOO | baz-bing |
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |