Skip to content

Instantly share code, notes, and snippets.

View takuan-osho's full-sized avatar
🏠
Working from home

SHIMIZU Taku takuan-osho

🏠
Working from home
View GitHub Profile
package main
import (
"github.com/codegangsta/martini"
)
func main() {
// Martini setup
m := martini.Classic()
package main
import (
"github.com/codegangsta/martini"
)
func main() {
// Martini setup
m := martini.Classic()
@takuan-osho
takuan-osho / join.go
Created January 19, 2014 13:52
Go言語でスライスとか文字列関係の勉強をしてみた ref: http://qiita.com/takuan_osho/items/74ef2d970a4888175336
package main
import (
"fmt"
"strings"
)
func main() {
s := []string{"ようこそ", "世界"}
fmt.Println(strings.Join(s, ""))
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/render"
)
func main() {
m := martini.Classic()
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/render"
)
func main() {
m := martini.Classic()
<!-- templates/hello.tmpl -->
<h2>Hello {{.}}!</h2>
<html>
<head>
<title>Martini Plz</title>
</head>
<body>
<!-- Render the current template here -->
{{ yield }}
</body>
</html>
@takuan-osho
takuan-osho / file0.txt
Created January 23, 2014 14:16
Google App Engineでデプロイ中に切断せざるを得なくなった後の問題を解消する方法 ref: http://qiita.com/takuan_osho/items/5b672ecd77e10f03f576
$ goapp deploy -oauth
09:22 PM Application: takuan-osho; version: 1
09:22 PM Host: appengine.google.com
09:22 PM
Starting update of app: takuan-osho, version: 1
09:22 PM Getting current resource limits.
09:22 PM Scanning files on local disk.
09:22 PM Cloning 14 static files.
09:22 PM Cloning 90 application files.
@takuan-osho
takuan-osho / file0.txt
Created April 3, 2014 06:22
OpenStack初心者でもVagrantを使ってOpenStackを体験する方法 ref: http://qiita.com/takuan_osho/items/7f571fb35d282251e5e7
config.vm.box = "hashicorp/precise64"
# 下のconfig.vm.box_urlは特に使わなくても平気なのでコメントアウトするか削除する
# config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
end
@takuan-osho
takuan-osho / ls.go
Last active August 29, 2015 14:03
見やすさとか何も考えていない超簡易版lsをgolangで書いてみるという実験です。
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
"time"