Skip to content

Instantly share code, notes, and snippets.

View syossan27's full-sized avatar
💭
🤔

syossan27 syossan27

💭
🤔
View GitHub Profile
$ ./structure-test-darwin-amd64
Please supply path to image or tarball to test against
$ make
$ dep ensure
$ dep init
$ git reset --hard 48ed3fffe3f5a215047a8ee3a312401494039bac
$ git clone git@github.com:GoogleCloudPlatform/container-structure-test.git
ticker := time.NewTicker(3 * time.Second)
stop := make(chan bool)
func (t *Termbox) RefreshRateDraw(ticker *time.Ticker, stop chan bool) {
for {
select {
case <-ticker.C:
t.UpdateData()
t.Draw()
case <-stop:
func (t *Termbox) Draw() {
termbox.Clear(color["default"], color["default"])
commandHistory := t.Commands
// 検索フォームの表示
displaySearchForm := "QUERY>"
t.Print(0, 0, style["fg"], style["bg"], displaySearchForm)
t.PrintSearchQuery(len(displaySearchForm), 0, style["fg"], style["bg"])
@syossan27
syossan27 / main.go
Last active December 11, 2017 11:06
package main
import (
"github.com/nsf/termbox-go"
)
func main() {
defer termbox.Close()
err := termbox.Init()
// テーブルに指定したIDのレコードがあれば、Contentsを返す
// 無かった場合、新たなレコードをInsertし、結果のContentsを返す
def hoge(id: Int): String = {
Await.result(database.findById(id), Duration.Inf) match {
case Some(result) => {
// idに合致するレコードがあればcontentsを返す
return result.contents
}
case None => {
val table_entity = TableEntity(id, "コンテンツ")