Skip to content

Instantly share code, notes, and snippets.

View ymotongpoo's full-sized avatar
📈
observability matters

Yoshi Yamaguchi ymotongpoo

📈
observability matters
View GitHub Profile
@ymotongpoo
ymotongpoo / pavement.py
Created April 13, 2012 10:07
Pavement for building dmd, druntime and phobos from trunk. Original version is written by repeatedly in rake style. see 329850
# -*- coding: utf-8 -*-
from paver.easy import *
import os
import os.path
import subprocess
def run_git(dirname):
print "git update %s" % dirname
sh("git pull ")
@ymotongpoo
ymotongpoo / erlang_ja_en.txt
Last active October 5, 2015 18:47
Erlang関連 訳語表
オリジナルは力武さんの投稿 http://erlang-users.jp/ml/erlang/index.cgi?0::166
アキュムレータ accumulator
アノテーション annotation
アリティ arity
ー致条件 match specification
入れ子リスト deep list
インターフェイス interface
エクスポート export
@ymotongpoo
ymotongpoo / pipeline.go
Created November 27, 2012 05:58
Channelを使ってのpipeline ref: http://qiita.com/items/0c61af9813b5039e21de
package main
import "fmt"
func main() {
queue := make(chan string)
out := make(chan int)
foo := []string{"foo","bar","baz","spam","egg","ham"}
var bar = map[string]int{
"foo": 1,
@ymotongpoo
ymotongpoo / pyspa_advent.py
Created November 30, 2012 05:58
2012 PySpa advent calendar抽選
import random
participants = ["ymotongpoo",
"shiumachi",
"mopemope",
"tk0miya",
"shimizukawa",
"kuenishi",
"ransui",
"turky",
#!/usr/bin/env python
# -* - coding: utf-8 -*-
import argparse
import inspect
import eyed3
import eyed3.id3
def convertID3Encoding(audiofile, backup = False):
tag = audiofile.tag
if not tag:
@ymotongpoo
ymotongpoo / hello.go
Last active December 21, 2015 00:09
GoでローカルでWebサーバ上げてHello, Worldする一番簡単な例。go run hello.goして、 http://localhost:8000/ にアクセスすれば "Hello, Gopher!" と表示されるはず
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", hello)
http.ListenAndServe(":8000", nil)
@ymotongpoo
ymotongpoo / main.go
Last active December 27, 2015 09:28
echo slack-bot
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
)
@ymotongpoo
ymotongpoo / main.go
Created November 30, 2013 08:05
Retrieving own Google+ posts
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
@ymotongpoo
ymotongpoo / main.go
Created October 4, 2014 05:49
ported WorkerThread.java to Go
package main
import (
"fmt"
"math/rand"
"runtime"
"strconv"
"sync"
"time"
)
@ymotongpoo
ymotongpoo / xshiumachi
Created February 9, 2015 04:04
X-Shiumachi
package main
import (
"log"
"net/http"
"time"
)
const (
TargetURL = `http://www.cloudera.co.jp/shiumachi`