Skip to content

Instantly share code, notes, and snippets.

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.

#!/bin/bash
# Script used to setup elasticsearch. Can be run as a regular user (needs sudo)
ES_USER="elasticsearch"
ES_GROUP="$ES_USER"
ES_HOME="/usr/local/share/elasticsearch"
ES_CLUSTER="clustername"
ES_DATA_PATH="/var/data/elasticsearch"
ES_LOG_PATH="/var/log/elasticsearch"
ES_HEAP_SIZE=1024
using UnityEngine;
using System;
using System.Collections;
using System.IO;
using System.Text;
/// <summary>
/// Bare minimum wrapper for UnityEngine.WWW.
///
%% @private
-spec init(list()) -> {ok, {SupFlags::any(), [ChildSpec::any()]}} |
ignore | {error, Reason::any()}.
init([]) ->
Dispatch = [
%% {Host, list({Path, Handler, Opts})}
{'_', [{[<<"graphs">>, graph], kw_handler, []}]}
],
RestartStrategy = one_for_one,
using UnityEngine;
using System.Collections;
using SuperWebSocket.Client;
using System;
public class Net : MonoBehaviour {
private string lastMessage = string.Empty;
public static string serverURI = "ws://192.168.100.196:12345/channels/0?userId=1";
public static WebSocket webSocket = new WebSocket(serverURI, "basic");
#!env /bin/bash
svn_clean(){
echo remove .svn in $1
find $1 -type d -name .svn -print0 | xargs -0 rm -rf
}
svn_submit(){
s_cnt=`find $1 -type f |wc -l`
echo $1 have $s_cnt files
<body></body>
<script src="http://gamingJS.com/Three.js"></script>
<script src="http://gamingJS.com/ChromeFixes.js"></script>
<script>
var camera, scene, renderer;
var geometry, material, mesh;
init();
function init() {
@lite
lite / thumb.py
Created February 5, 2013 09:48
Save scratch file(*.sb) to thumbnail.png
#!/usr/bin/env python
# coding=utf-8
# pip install kurt
# python thumb.py 3013900.sb
import sys
import kurt
from kurt.files import ScratchProjectFile, ScratchSpriteFile
{
// You probably want to configure this to something of your own.
// ${home}, ${env:<variable>}, ${project_path:} and ${folder:} tokens can be used in the completesharp_assemblies option.
//
// ${home} is replaced with the value of the HOME environment variable.
//
// ${env:<variable>} is replaced with the "variable" environment variable.
//
// ${project_path:} tries to find a file with the given name in all the registered project folders and
// returns the first file found, or the original file name if none is found.