Skip to content

Instantly share code, notes, and snippets.

Vagrant.configure("2") do |config|
config.vm.define "control" do |control|
control.vm.box = "centos/7"
control.vm.network :private_network, ip:"192.168.33.100"
control.vm.network "public_network", ip: "192.168.1.100"
end
config.vm.define "lb1i" do |lb1i|
lb1i.vm.box = "centos/7"
lb1i.vm.network :private_network, ip:"192.168.33.11"
lb1i.vm.network "public_network", ip: "192.168.1.11"
[databases]
db1i ansible_host=192.168.33.31
db2i ansible_host=192.168.33.32
[database_vip]
db_v1i ansible_host=192.168.33.1
[apps]
app1i ansible_host=192.168.33.21
app2i ansible_host=192.168.33.22
## クラス
- 水
- プロパティ
- 量
- 温度
- メソッド
- 温度変更
- 電気ポット
- プロパティ
- 水
CREATE TABLE t1 (jdoc JSON);
INSERT INTO t1 VALUES('{"name": "aaa1", "type": 1, "available": true, "start": "2021-06-25T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa2", "type": 1, "available": false, "start": "2021-06-26T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa3", "type": 1, "available": false, "start": "2021-06-27T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa4", "type": 1, "available": true, "start": "2021-06-28T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa1", "type": 2, "available": true, "start": "2021-06-25T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa2", "type": 2, "available": false, "start": "2021-06-24T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa3", "type": 2, "available": false, "start": "2021-06-23T00:00:00+09:00"}');
INSERT INTO t1 VALUES('{"name": "aaa4", "type": 2, "available": true, "start": "2021-06-22T00:00:00+09:00"}');
@Mo3g4u
Mo3g4u / decode.go
Last active December 3, 2021 00:45
go decode sample
package main
import (
"context"
"encoding/base64"
"io"
"os"
"strings"
"golang.org/x/sync/errgroup"
@Mo3g4u
Mo3g4u / encode.go
Last active December 3, 2021 00:44
go encode sample
package main
import (
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"log"
"strings"
)
@Mo3g4u
Mo3g4u / bimap.go
Created December 3, 2021 06:58
bimap
package bimap
import (
"sync"
"github.com/artis-inc/axis-shared/log"
)
// 方向の定義
const (
@Mo3g4u
Mo3g4u / struct-option.go
Created August 19, 2022 05:06
構造体を利用したオプション引数
package main
// 構造体を利用したオプション引数
import "fmt"
type Portion int
const (
Regular Portion = iota
@Mo3g4u
Mo3g4u / builder-option.go
Created August 19, 2022 05:14
ビルダーを利用したオプション引数
package main
// ビルダーを利用したオプション引数
import "fmt"
type Portion int
const (
Regular Portion = iota
@Mo3g4u
Mo3g4u / functional-option.go
Created August 19, 2022 06:48
Functional Optionパターンを使ったオプション引数
package main
import "fmt"
// Functional Optionパターンを使ったオプション引数
type Portion int
const (
Regular Portion = iota