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
// ログの内容を流し込むとエディタ上に表示したりするやつ。 | |
defineFilter: { | |
"name": "unity", | |
"filters": [ | |
{ | |
// log line of error | |
"(.*)[(]([0-9].*?),.*[)]: error .*: (.*)": { | |
"injects": { | |
"groups[0]": "name", |
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
// かっこの数が合わない | |
task hello { | |
doLast { | |
println 'Hello world!' | |
} | |
// actual | |
gradle -m clean compile |
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
// shader error & warning | |
{ | |
// Shader error in 'Custom/TestShader': Parse error: syntax error at line 9 | |
"Shader error in [']Custom/(.*)[']: (.*) at line ([0-9].*)": { | |
"injects": { | |
"groups[0]": "name", | |
"groups[1]": "message", | |
"groups[2]": "line" | |
}, | |
"selectors": [ |
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
static class Assertions { | |
/** | |
assert which extends bool. | |
usage: | |
(0 < transform.position.y).Assert("fall in negative."); | |
*/ | |
public static void Assert (this bool condition, string reason) { | |
if (condition) return; |
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
/* | |
example | |
"2014/06/23 3:05:34".TimeAssert(30, "time over!"); | |
*/ | |
using System; | |
using System.Globalization; | |
using UnityEngine; | |
static class Assertions { |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
/** | |
仮。もっと小さくしたい。 | |
ネームスペースごとに、扱える数が異なる。 | |
*/ |
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
using UnityDebug = UnityEngine; | |
using System.IO; | |
using System.Text; | |
using System.Diagnostics; | |
public class LogWriter { | |
private static string targetPath = string.Empty; | |
public static void StartTransLogging (string path) { |
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
--[[] | |
ゲームとか書けるところ。あとコンテキストの名の通り、データベースに依存せずにパラメータとか持てるぞ。 | |
]] | |
local M = {} | |
function M.onConnect(from, publish) | |
ngx.log(ngx.ERR, "connect from:", from) | |
end |
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
-- Disque client for lua. | |
local sub = string.sub | |
local byte = string.byte | |
local tcp = ngx.socket.tcp | |
local concat = table.concat | |
local null = ngx.null | |
local pairs = pairs | |
local unpack = unpack | |
local setmetatable = setmetatable |
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
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" |