Skip to content

Instantly share code, notes, and snippets.

@dictav
dictav / gopher.swift
Created February 14, 2017 02:50
swift のエラーハンドリングをGoっぽく書けないかなーと言うあがき
import Foundation
func result<T>(_ closure: @autoclosure () throws -> T) -> (T?, Error?) {
do {
let a = try closure()
return (a, nil)
} catch (let err) {
return (nil, err)
}
}
'use strict'
const assert = require('assert')
describe('Sample', () => {
it('gets the title of dictav.net', () => {
const title = browser.url('https://dictav.net').getTitle()
assert.equal(title, 'DICTAV')
})
})
'use strict'
const assert = require('assert')
describe('Console Log', () => {
it('gets the title of dictav.net', () => {
const title = browser.url('https://dictav.net').getTitle()
assert.equal(title, 'DICTAV')
})
it('has no SEVERE error', () => {
g1
@startuml;
autonumber 10 10 "<b>[000]"
;
actor "Nanp App" as app;
participant "Browser" as br;
participant "nanp.builderscon.io" as ns;
participant "OAuth\nProvider" as op;
participant Octav as octav;
;
@dictav
dictav / bench.md
Last active September 11, 2017 01:55
GCP benchmark

history

  • rev6: debian9 のプロセスを見直して余計なプロセスを停止
  • rev4: nginx-slim:0.23 を追加
  • rev3: ubuntu16.04 を追加

instances

$ gcloud compute instances list
package main
import (
as "github.com/aerospike/aerospike-client-go"
astp "github.com/aerospike/aerospike-client-go/types"
"math"
"time"
)
type hoge struct {
$ go checkout fix/serialize
$ go run ./cmd/_dictool/main.go ipa -mecab mecab-ipadic/ -output out1
$ go run ./cmd/_dictool/main.go ipa -mecab mecab-ipadic/ -output out2
$ shasum out{1,2}/ipa.dic
79ccee038f2edc6544e3ee264419615c624c207d out1/ipa.dic
79ccee038f2edc6544e3ee264419615c624c207d out2/ipa.dic
@dictav
dictav / シェアハウスを解散するにあたってのエントリ.md
Last active January 13, 2025 15:21
geek-koshiji.com/2018/02/21/post-332/ のバックアップ

このエントリは残しておかないといけないと思ったので残します。 copyright 2018 https://twitter.com/geek_niigata


シェアハウスを解散するにあたってのエントリ

2018/2/21 ブログ

2月末でギークハウス越路を解散することになりましたのでその経緯エントリ。