Skip to content

Instantly share code, notes, and snippets.

@Nickology
Nickology / vagrant-bindfs-nfs.md
Created August 19, 2016 14:04
Vagrantfile NFS using vagrant-bindfs to speed up Docker on Mac

To speed up volumne mounting between Docker and your Mac:

  1. Install vagrant-bindfs
vagrant plugin install vagrant-bindfs
  1. Update your Vagrantfile:
@Nickology
Nickology / docker-machine-use-nfs.sh
Created September 26, 2015 00:33 — forked from olalonde/docker-machine-use-nfs.sh
Use NFS instead of vboxsf in Docker Machine
#!/bin/bash
#
# This script will mount /Users in the boot2docker VM using NFS (instead of the
# default vboxsf). It's probably not a good idea to run it while there are
# Docker containers running in boot2docker.
#
# Usage: sudo ./boot2docker-use-nfs.sh
#
@Nickology
Nickology / array_merge_recursive_numeric()
Last active August 1, 2021 17:17
[PHP] Merge N arrays AND sum numeric values of identical keys
<?php
/**
* array_merge_recursive_numeric function. Merges N arrays into one array AND sums the values of identical keys.
* WARNING: If keys have values of different types, the latter values replace the previous ones.
*
* Example:
*
* $a = array( "A" => "bob", "sum" => 10, "C" => array("x","y","z" => 50) );
* $b = array( "A" => "max", "sum" => 12, "C" => array("x","y","z" => 45) );
* $c = array( "A" => "tom", "sum" => 8, "C" => array("x","y","z" => 50, "w" => 1) );
Verifying that +nickology is my openname (Bitcoin username). https://onename.io/nickology