Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@akira093
akira093 / homedir.go
Created April 25, 2018 11:42
In golang, there are two way of joining filepath.
package main
import (
"fmt"
"os/user"
"path"
"path/filepath"
)
var dbPath = "/.config/go-wol/bolt.db"
<html>
<head>
<title>
test
</title>
<meta http-equiv="Access-Control-Allow-Origin" content="*">
<meta http-equiv="Access-Control-Allow-Headers" content="*">
<meta http-equiv="Access-Control-Allow-Methods" content="GET">
</head>
<body>
package main
import (
"code.google.com/p/plotinum/plot"
"code.google.com/p/plotinum/plotter"
"code.google.com/p/plotinum/plotutil"
"code.google.com/p/plotinum/vg"
"fmt"
"math"
)
# coding:utf8
import multiprocessing
import time
"""
multiprocessing.Poolのchunkってどんな感じよー?
"""
def square(n):
package main
import (
"log"
"net/http"
"os"
"path"
)
func main() {
package main
import (
"database/sql"
"fmt"
"net/http"
"github.com/go-martini/martini"
_ "github.com/mattn/go-sqlite3"
package main
import (
"fmt"
"github.com/ChimeraCoder/anaconda"
"math"
"net/url"
)
func reverseTWs(tws []anaconda.Tweet) []anaconda.Tweet {
package main
import (
"errors"
"flag"
"fmt"
"github.com/ChimeraCoder/anaconda"
"net/url"
"runtime"
"sync"
class TMT
def happy?
true
end
end
tmt = TMT.new
p tmt.happy?
package main
import (
"image"
"image/color"
"image/png"
"math"
"os"
)