Skip to content

Instantly share code, notes, and snippets.

@tkc
tkc / main.go
Last active Feb 3, 2021
Find out the relationship between coredns response and frequency
View main.go
package main
import (
"fmt"
"os"
"os/exec"
"strings"
"sync"
"time"
)
View go-jwt-sample
package main
import (
"encoding/json"
"log"
"net/http"
"time"
jwtmiddleware "github.com/auth0/go-jwt-middleware"
jwt "github.com/dgrijalva/jwt-go"
View sentry-go-sample
package main
import (
"errors"
"log"
"time"
"github.com/getsentry/sentry-go"
)
View go-gin-middleware-contex-sample
package main
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/spf13/cast"
"github.com/thoas/go-funk"
)
View nginx.conf with React Router and Node Reverse Proxy Server
upstream node_server {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
View gist:57aff23ac61007f2246e745f9c189b42
1. aaa
2. bbb
3. ccc
```
シリアル時刻,水深,固定値,水温,固定値,固定値,固定値,電圧,固定値,固定値,固定値,固定値,固定値,音響データ(320バイトを2文字のHEXで列挙、水深の浅い方が左、深い方が右)
1506092400,46.0,-30.0,16.6,1000.0,99999.90,-30.0,12.6,0.0,99999.9,3,320,40 ,ffffffff6f595e665f5e5752434e4854565050585b52443e40413a515637363f3d3e4b4f3c40362f2918333d2d272328152a3b311f2c211b0f1f1c0e24131c211721091329280d1b1f2116060700140f0b06000800070a0109000c09100c00000208030308120d04070805000207000001000004080100000004040a040e060000000000010200000100000000070000000100000000000000000000020401000200000002000000040000010509030004000003090500010200000e0d1339504f5068736463616a716b573d3f5250463b28242f384c4f40363b373f42383c36312d2a201626192015221e13090614181715020001040f17170104110e0a0b0e08000304020000070f15120800010400010103000001000000000000000001000604020102020006030000000004000000000000000100000001010001060100
```
@tkc
tkc / install-go.sh
Created Aug 10, 2018 — forked from ndaidong/install-go.sh
Install Go 1.10 in Ubuntu 16+
View install-go.sh
#!/bin/bash
export GO_VERSION=1.10
export GO_DOWNLOAD_URL=https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz
export GOPATH=/usr/local/lib/go
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
sudo mkdir ${GOPATH}
sudo chown ${USER} -R ${GOPATH}
View gist:8a39dea6a277ba7c67d9cac874ca4ab9
package bigquery
import (
"log"
"reflect"
"io/ioutil"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/bigquery/v2"
)
View gist:113726894216fa2982a541362028a696
package bigquery
import (
"log"
"reflect"
"io/ioutil"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"google.golang.org/api/bigquery/v2"
)
View my-git-commands
## my-git-commands
git fetch --all
git fetch --all && git reset --hard origin/master
git tag
git checkout refs/tags/v2.2.0