This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker volume ls -f dangling=true -q | xargs docker volume rm | |
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Gist contains a snippet for auto-mounting non `/Users` or `/c/Users` directory on docker-machine with VirtualBox driver. | |
# 1. Add more shared folder on VirtualBox e.g., D:\Code -> /d/Code (and make it permanent) | |
# 2. Access Docker Machine SSH `docker-machine ssh` | |
# 3. Append the following code after original `/var/lib/boot2docker/profile` file. (as root/sudo) | |
# 4. `docker-machine restart` | |
# Note: Change the last line to match your shared folder | |
try_mount_share() { | |
dir="$1" | |
name="${2:-$dir}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"autoload": { | |
"psr-0": { | |
"Thrift\\": "vendor/apache/thrift/lib/" | |
}, | |
"classmap": ["gen-php"] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$1" != "" ]; then | |
FILE=$1 | |
REPO=$1_repo | |
else | |
exit 1 | |
fi | |
if [ ! -d "$REPO" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$1" != "" ] && [ "$2" != "" ]; then | |
FILE=$1 | |
REPO=$1_repo | |
else | |
echo "$0 <docx file> <comment>" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hungarian($matrix) | |
{ | |
$h = count($matrix); | |
$w = count($matrix[0]); | |
if ($h < $w) | |
{ | |
for ($i = $h; $i < $w; ++$i) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# +----------------------------------------------------------------------+ | |
# | | | |
# | Set up Mac OS X to store temporary files in RAM rather than on disk.| | |
# | | | |
# | By Philipp Klaus <http://blog.philippklaus.de> | | |
# | | | |
# | Originally by Ricardo Gameiro <http://blogs.nullvision.com/?p=357> | | |
# | Changes by Daniel Jenkins | |
NewerOlder