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.
This file contains 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
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"); | |
This file contains 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
%% @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, |
This file contains 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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
/// <summary> | |
/// Bare minimum wrapper for UnityEngine.WWW. | |
/// |
This file contains 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 | |
# 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 |
This file contains 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
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt | |
sudo mv add-apt-repository.sh.txt /usr/sbin/add-apt-repository | |
sudo chmod o+x /usr/sbin/add-apt-repository | |
sudo chown root:root /usr/sbin/add-apt-repository | |
sudo add-apt-repository ppa:webupd8team/sublime-text-2 |
This file contains 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
#!/usr/bin/env python | |
''' | |
Sample code for Apple Push Notification Service in Python | |
Author: Jacky Tsoi <jacky@tsoi.me> | |
Date: December 15, 2011 | |
''' | |
import ssl | |
import json |
This file contains 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
#!/usr/bin/env python | |
# coding=utf-8 | |
import sys | |
import pexpect | |
class OpenQQShell: | |
def __init__(self, app_user, jumper_ip, jumper_port, token, passwd, cvm_ip): | |
self.p = self.get_shell(app_user, jumper_ip, jumper_port, token, passwd, cvm_ip) | |
This file contains 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
// You can switch to a regular Update() loop | |
// if you comment out this line. (makes debugging easier) | |
#define COROUTINE | |
// | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Text; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; |
This file contains 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
{"frames": { | |
{% for sprite in spritesAndAliases %} | |
"{{ sprite.name }}": | |
{ | |
"frame": {"x":{{ sprite.textureRectX }},"y":{{ sprite.textureRectY }},"w":{{ sprite.textureRectWidth }},"h":{{ sprite.textureRectHeight }}}, | |
"rotated": {% if sprite.isRotated %}true{% else %}false{% /if %}, | |
"trimmed": {% if sprite.isTrimmed %}true{% else %}false{% /if %}, | |
"spriteSourceSize": {"x":0,"y":0,"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
"sourceSize": {"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
"spriteColorRect": {"x":{{ sprite.sourceColorRectX }},"y":{{ sprite.sourceColorRectY }},"w":{{ sprite.sourceColorRectWidth }},"h":{{ sprite.sourceColorRectHeight }}}, |
OlderNewer