Skip to content

Instantly share code, notes, and snippets.

@hitsujiwool
hitsujiwool / changes_on_common_modules.md
Last active December 31, 2015 01:09
Developer Guide for Term Suite Japanese Component

Some addition and modification were done to files other than Japanese components which is placed under japanese directory. Althrough not tested comprehensively in all the languages, these changes have hardly any (negative) side effects on the other language components.

build.gradle

  • Added remote maven repository of my own hosted on GitHub for Japanese component. As this is only for my own convenience, it may be better to clone them and start to manage it on the term-suite repository.

  • Specified the directory for unit testing (under ttc-term-suite/tests/).

eu.project.ttc.resources.SimpleTermFrequency

function* fib() {
var i = 0,
j = 1,
res;
while (true) {
res = i + j;
i = j;
j = res;
yield res;
var sinon = require('sinon');
var assert = require('assert');
function async(cb) {
setTimeout(function() {
cb();
}, 1000);
}
describe('async()', function() {
#!/bin/bash
#
# NAME
# gitcmp
#
# SYNOPSIS
# gitcmp dir [branch-name]
#
# DESCRIPTION
# Check if the local head and the remote head refers to the same commit revision.
@hitsujiwool
hitsujiwool / Application.scala
Last active August 29, 2015 14:02
WebSocket on Play2.3
package controllers
import play.api.libs.iteratee._
import play.api.mvc._
import play.api.libs.concurrent.Execution.Implicits._
object Application extends Controller {
def ws = WebSocket.using[String] { request =>
val (out, channel) = Concurrent.broadcast[String]
@hitsujiwool
hitsujiwool / docker.json
Created September 15, 2015 06:20
docker + docker-compose on Amazon Linux
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}"
},
"builders": [
{
"type": "amazon-ebs",
"ssh_pty": true,
"access_key": "{{user `aws_access_key`}}",