Skip to content

Instantly share code, notes, and snippets.

View yychen's full-sized avatar

Tom Chen yychen

View GitHub Profile
@yychen
yychen / gist:5694142
Created June 2, 2013 16:59
.screenrc
# 關閉啟動訊息。
startup_message off
# 加入狀態列。
caption always "%{=u .r} %-w%<%{=ub .Y}%n %t%{=u .r}%+w "
hardstatus alwaysignore
hardstatus alwayslastline "%{= .K} [%l]%<%=%{= .Y}$USER%{= .R}@%H %=%{= .m} %Y/%m/%d%{= .M} %0c "
# 將預設編碼設為 UTF-8。
defutf8 on
@yychen
yychen / .vimrc
Last active December 21, 2018 09:57
" set cin
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
" set textwidth=79
set shiftround
set autoindent
color koehler
filetype plugin indent on
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
@yychen
yychen / APIService.cs
Last active September 24, 2018 11:33
APIService.cs
using System;
using System.Collections;
using System.Collections.Generic;
using RSG;
using UnityEngine;
using UnityEngine.Networking;
public class RequestException : Exception {
public UnityWebRequest Request { get; set; }
@yychen
yychen / Mayor.cs
Created September 24, 2018 11:35
Mayor.cs
using System;
using System.Collections;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEngine.Networking;
using RSG;
@yychen
yychen / bgm.cs
Created September 26, 2018 10:30
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class BGMBridge : BridgeBase
{
public BGMManager manager;
#!/usr/bin/env python3
import socket
import time
UDP_HOST = '0.0.0.0'
UDP_PORT = 3838
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind((UDP_HOST, UDP_PORT))
#!/usr/bin/env python3
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 3838
# MESSAGE = "\nter 0.78\nmaster 0.4\nmaster 0.5"
MESSAGE = "This is a test....\n\n"
print("UDP target IP:", UDP_IP)
print("UDP target port:", UDP_PORT)
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
function question(query) {
return new Promise((resolve) => {
rl.question(query, (answer) => {