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
require 'test/unit' | |
class MyTest < Test::Unit::TestCase | |
def test_myTestCase | |
test = "here comes" | |
# test = nil | |
assert(test, msg = (nomsg = true;nil)) | |
end | |
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
//gwt option instructions of gwt 2.5rc | |
-port Specifies the TCP port for the embedded web server (defaults to 8888) | |
-whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) | |
-blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) | |
-logdir Logs to a file in the given directory, as well as graphically | |
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL | |
-gen Debugging: causes normally-transient generated types to be saved in the specified directory | |
-codeServerPort Specifies the TCP port for the code server (defaults to 9997) | |
-war The directory into which deployable output files will be written (defaults to 'war') |
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
local gameKey = "test" | |
local identity = string.gsub (ngx.var.uri, "/", "") --replace /wildcard_sample* to wildcard_sample* | |
IDENTIFIER_CENTRAL = identity .. "_pub" | |
IDENTIFIER_CLIENT = identity .. "_sub" | |
STATE_CONNECT = "connect" |
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
-- get identity of game from url. e.g. http://somewhere/game_key -> game_key | |
local identity = string.gsub (ngx.var.uri, "/", "") | |
-- generate pub-sub key from url. | |
IDENTIFIER_CENTRAL = identity .. "_pub" | |
IDENTIFIER_CLIENT = identity .. "_sub" | |
STATE_CONNECT = 1 | |
STATE_MESSAGE = 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
-- get identity of game from url. e.g. http://somewhere/game_key -> game_key | |
local identity = string.gsub (ngx.var.uri, "/", "") | |
-- generate identity of queue for target context. | |
IDENTIFIER_CONTEXT = identity .. "_context" | |
-- identifier-client = UUID. e.g. AD112CD4-3A23-4E49-B562-E07A360DD836 len is 36. | |
HEADER_STRING = 's' |
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
trait TimeAssert { | |
val SecUnit = 1000 | |
def timeAssert(timestamp: String, message: String, delaySec: Int = 0) = { | |
val timestampDate = new SimpleDateFormat("MM/dd/yy HH:mm:ss").parse(timestamp) | |
val limit = timestampDate.getTime + delaySec * SecUnit | |
val currentDate = new Date | |
val currentDateTime = currentDate.getTime |
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
var WebSocket = require('ws'); | |
var assert = require('assert'); | |
var msgpack = require('msgpack'); | |
var ws = new WebSocket('ws://127.0.0.1:8823/'); | |
Tail = require('tail').Tail; | |
tail = new Tail("/Users/sassembla/Library/Logs/Unity/Editor.log"); | |
ws.on('open', function() {}); |
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 UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
[InitializeOnLoad] | |
public class UnityEditorTestKit : MonoBehaviour { |
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 UnityEditor; | |
using System.Collections; | |
public class BuildBatch : MonoBehaviour { | |
// build iOS app | |
private static void BuildiOS(){ | |
Debug.Log("/////////// build start ///////////"); | |
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
Uniy errors & regexp | |
1.error on edit | |
sample: | |
Assets/Flight/Scripts/WorldRule.cs(44,52): error CS1525: Unexpected symbol `)', expecting `;' | |
2.error on play | |
sample: | |
MissingReferenceException: The variable flighterPrefab of 'WorldRule' doesn't exist anymore. | |
You probably need to reassign the flighterPrefab variable of the 'WorldRule' script in the inspector. |