Skip to content

Instantly share code, notes, and snippets.

View taichi's full-sized avatar
😸
shaving...

taichi taichi

😸
shaving...
View GitHub Profile
@taichi
taichi / rand.go
Created February 3, 2014 09:51
random string generator written in go
package rand
import (
"crypto/rand"
"math/big"
)
type RandomStringer struct {
proposal []rune
length *big.Int
import (
"crypto/rand"
"strings"
)
func FixSeed(seed string, fn func()) func() {
return func() {
orig := rand.Reader
rand.Reader = strings.NewReader(seed) // fix seed
defer func() {
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"syscall"
)

java-ja ymsr送別会

自己紹介

今日のイベント主催者の太一です。

ymsrに対する最大にして最後のイタヅラが今日の送別会です。

@taichi
taichi / install_rethinkdb_to_ubuntu.md
Created February 21, 2014 05:28
[RethinkDB](http://www.rethinkdb.com/) を ubuntu12.10 にインストールした。(2014/02)

RethinkDB を ubuntu12.10 にインストールした。(2014/02)

RethinkDB は開発者にとって使い易いJsonベースのドキュメント指向データベースです。

MongoDBCouchDBとどう違うのかは公式ドキュメントにあります。

事前準備

@taichi
taichi / main.go
Created February 21, 2014 09:17
RethinkDB and golang
package main
import (
r "github.com/dancannon/gorethink"
"log"
)
type upd struct {
Zzz []string `gorethink:"zzz"`
}
@ECHO OFF
::----------------------------------------------------------------------
:: WebStorm startup script.
::----------------------------------------------------------------------
:: ---------------------------------------------------------------------
:: Locate a JDK installation directory which will be used to run the IDE.
:: Try (in order): WEBIDE_JDK, ..\jre, JDK_HOME, JAVA_HOME.
:: ---------------------------------------------------------------------
@taichi
taichi / home.html
Created February 26, 2014 12:01
simple chat server on top of websocket.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Chat Example</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
var conn;
オリジナルは力武さんの投稿 http://erlang-users.jp/ml/erlang/index.cgi?0::166
アキュムレータ accumulator
アノテーション annotation
アリティ arity
ー致条件 match specification
入れ子リスト deep list
インターフェイス interface
エクスポート export
@taichi
taichi / unittests.js
Last active August 29, 2015 13:57
Brackets Extension template.
// see.
// http://jasmine.github.io/1.3/introduction.html
// https://github.com/adobe/brackets/wiki/How-to-Write-Extensions
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */
/*global define, $, brackets, describe, it, expect, beforeFirst, afterLast, beforeEach, afterEach, runs, waitsFor, waitsForDone, waitsForFail */
/*unittests: MyExtension */ // for Test Runner of https://github.com/dangoor/TestQuickly
define(function(require, exports, module) {
"use strict";
var SpecRunnerUtils = brackets.getModule("spec/SpecRunnerUtils"),
FileUtils = brackets.getModule("file/FileUtils");