Skip to content

Instantly share code, notes, and snippets.

@sekky0905
sekky0905 / file0.txt
Created February 14, 2017 14:56
TypeScript + webpack + Karma + Mocha + Power Assertでテストを行う際の諸々の設定ファイル ref: http://qiita.com/Sekky0905/items/e54c7fc124c3f2b6d152
{
// パッケージの名前
"name": "パッケージ名",
// パッケージのバージョン
"version": "1.0.0",
// パッケージの説明
"description": "パッケージの説明文",
// 項目はパッケージの中で最初に呼ばれるモジュールのID
"main": "./dist/hoge.js",
// scriptコマンド
@sekky0905
sekky0905 / main.go
Created February 21, 2017 07:45
GAE/Go Datastore manipulation
package tictactoego
import (
"fmt"
"net/http"
"time"
"google.golang.org/appengine"
"google.golang.org/appengine/datastore"
"html/template"
"google.golang.org/appengine/taskqueue"
import "fmt"
type Language struct {
Name string
LangType string
}
// コンストラクタ
// 戻り値として返すのは、構造体のポイントであることに注意
func NewLanguage(name string, langType string) *Language {
@sekky0905
sekky0905 / file0.txt
Last active February 23, 2017 13:49
Go言語のTemplateパッケージを使い作成したHTMLテンプレートでCSS等の静的ファイルをリンクさせる時の注意 ref: http://qiita.com/Sekky0905/items/fca9d9118ef23bf24791
sample
|_resources <-以下に各種類別静的ファイル(今回はcssのみ)
| |_css
|_view
| |_index.html(テンプレート)
|_main.go
@sekky0905
sekky0905 / file0.go
Last active February 25, 2017 15:47
【Go言語】GAE/Goでuser APIを使ってユーザー認証 ref: http://qiita.com/Sekky0905/items/41068fc50184e20f9d6e
package main
import (
"net/http"
"google.golang.org/appengine"
"google.golang.org/appengine/user"
"html/template"
"fmt"
)
@sekky0905
sekky0905 / file0.go
Last active February 26, 2017 11:48
Go言語でFizzBuzz!を書いてみた ref: http://qiita.com/Sekky0905/items/9a5a459e143303cd0a18
package main
import (
"fmt"
)
func main() {
i := 1
for i < 101 {
@sekky0905
sekky0905 / file0.txt
Last active March 4, 2017 13:22
Go言語とTypeScript(JavaScript)でライブラリなしでAjaxなコードをXMLHttpRequestオブジェクトを使って書いてみた ref: http://qiita.com/Sekky0905/items/07affe9e68744eba6c89
apprppt
|_source
| |_index.js
| |_index.ts
| |_package.json
| |_tsconfig.json
|_view
| |_index.html
|_main.go
@sekky0905
sekky0905 / cookie.html
Last active March 20, 2017 03:59
Go言語でCookieを操作する(設定と取得) ref: http://qiita.com/Sekky0905/items/f4cad4cacf5872df001e
@sekky0905
sekky0905 / file0.txt
Last active May 15, 2017 14:28
GoでBigQueryクライアントを実装してBigQueryからデータを取得する ref: http://qiita.com/Sekky0905/items/fd6ff9113d301aaa9e1d
go get cloud.google.com/go/bigquery
@sekky0905
sekky0905 / file0.go
Last active May 19, 2017 13:39
Go言語でSendGrid Web API v3を使って、メールを送信する ref: http://qiita.com/Sekky0905/items/7f7285d0a2b3e5f21e57
package main
import (
"encoding/json"
"fmt"
"github.com/joho/godotenv"
"github.com/sendgrid/sendgrid-go"
"log"
"os"
)