Skip to content

Instantly share code, notes, and snippets.

hogehoge
@kyubuns
kyubuns / gist:3709247
Created September 12, 2012 19:21
chat.coffeeたたき台
$ ->
if not "WebSocket" in window
alert "WebSocket NOT supported by your Browser!"
return
#-----ここからライブラリでやる-----
METHOD_IDS = {
'chatStoC' : 100,
'chatCtoS' : 200
}
@kyubuns
kyubuns / chat.coffee
Created September 12, 2012 19:21
ちゃっと。
$ ->
if not "WebSocket" in window
alert "WebSocket NOT supported by your Browser!"
return
#-----ここからライブラリでやる-----
METHOD_IDS = {
'chatStoC' : 100,
'chatCtoS' : 200
}
@kyubuns
kyubuns / OrmTest.hx
Created December 15, 2013 15:18
(>_<。) haxe3.0.1
import sys.db.Types;
class User extends sys.db.Object {
public var id : SId;
public var name : SString<32>;
public var birthday : SDate;
public var phoneNumber : SNull<SText>;
}
class OrmTest {
// attached this script to root game object of 'Button Prefab' with UIButton(NGUI).
using UnityEngine;
using System.Collections;
public class ButtonText : MonoBehaviour {
[SerializeField] UILabel label;
public string text
{
set {
using UnityEngine;
using UnityEditor;
using System;
public class TestWindow : EditorWindow {
// Serializableの物(public or SerializeField)がUndo対象.
[SerializeField] string testText;
// うぃんど~ひらくよ~
[MenuItem("Window/TestWindow")]
using UnityEngine;
using System.Collections;
public class TestButton : MonoBehaviour {
[SerializeField] string imageUrl;
UITexture texture;
void Awake()
{
texture = GetComponent<UITexture>();
import vibe.core.core : sleep;
import vibe.core.log;
import vibe.http.fileserver : serveStaticFiles;
import vibe.http.router : URLRouter;
import vibe.http.server;
import vibe.http.websockets : WebSocket, handleWebSockets;
import core.time;
shared static this()
@kyubuns
kyubuns / Model.cs
Created October 14, 2014 14:59
Hoge
using UnityEngine;
using System;
using System.Collections;
public class Model
{
public Action<string> OnChange;
protected void Changed(string propertyName)
{
if(OnChange != null) OnChange(propertyName);
using UnityEngine;
using UnityEditor;
using System.Collections;
[CustomEditor(typeof(CanvasRenderer))]
public class CanvasRendererMover : Editor
{
static int hint = "WidgetHash".GetHashCode();
void OnSceneGUI()
{