Skip to content

Instantly share code, notes, and snippets.

Shintaro Kaneko kaneshin

Block or report user

Report or block kaneshin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cloudbuild_trigger.tf
resource "google_cloudbuild_trigger" "build_trigger" {
trigger_template {
branch_name = "master"
repo_name = "github_kaneshin_foobar"
dir = "cmd/foobar"
}
build {
images = ["gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA"]
step {
name = "gcr.io/cloud-builders/docker"
View check_redirect.go
package main
import (
"flag"
"fmt"
"net/http"
"os"
)
var (
View foo.go
package main
import (
"fmt"
"regexp"
"sync"
)
var re1 = regexp.MustCompile("hoge.*")
var re2 = regexp.MustCompile("foo.*")
View main.go
package main
import "fmt"
type Member int
type Male Member
type Female Member
const (
male Member = iota
View gist:9814d4980c0954137296a288f59ab952
{
"actions": [{
"id": {
"required": true,
"empty": false,
"value": "send_like"
},
"group": {
"required": true,
"empty": false,
View main.go
package main
import (
"context"
"log"
"net/http"
"time"
)
func main() {
View replace_test.go
package slackutil
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_Replacer(t *testing.T) {
r := NewReplacer(nil)
View .vimrc
" use emacs key bind during command mode and a movement of insert mode
" start of line
cnoremap <c-a> <Home>
inoremap <c-a> <Home>
" back one character
cnoremap <c-b> <Left>
inoremap <c-b> <Left>
" delete character under cursor
cnoremap <c-d> <Del>
inoremap <c-d> <Del>
View main.go
package main
import (
"bufio"
"context"
"flag"
"fmt"
"os"
"os/signal"
"sync"
View main.go
package main
import (
"bytes"
"fmt"
"os/exec"
)
func main() {
cmd := exec.Command("ls", "-lf")
You can’t perform that action at this time.