This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
| ⌘T | 前往文件 |
| ⌘⌃P | 前往项目 |
| ⌘R | 前往 method |
| ⌘⇧P | 命令提示 |
| 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 |
| // 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; |
| #define DEBUG_CONSOLE | |
| #define DEBUG_LEVEL_LOG | |
| #define DEBUG_LEVEL_WARN | |
| #define DEBUG_LEVEL_ERROR | |
| #if (UNITY_EDITOR || DEVELOPMENT_BUILD) | |
| #define DEBUG | |
| #endif | |
| #if (UNITY_IOS || UNITY_ANDROID) |
| {"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 }}}, |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
| ⌘T | 前往文件 |
| ⌘⌃P | 前往项目 |
| ⌘R | 前往 method |
| ⌘⇧P | 命令提示 |
| { | |
| // 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. |
| 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"); | |
| %% @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; | |
| using System.Collections; | |
| using System.IO; | |
| using System.Text; | |
| /// <summary> | |
| /// Bare minimum wrapper for UnityEngine.WWW. | |
| /// |
| #!/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 |