Skip to content

Instantly share code, notes, and snippets.

@yudppp
yudppp / gist:5832460e5652269c9583453dd338bb6e
Created October 16, 2021 09:11
Left Command + Spaceで英数・かなキーを入れ替えるkarabiner-elementsの設定
{
"title":"Left Command + Spaceで英数・かなキーを入れ替える",
"rules":[
{
"description":"Left Command + Spaceで英数・かなキーを入れ替える",
"manipulators":[
{
"conditions":[
{
"type":"input_source_unless",
@yudppp
yudppp / app.go
Created September 24, 2018 10:07
isucon2018
package main
import (
"bytes"
"crypto/sha256"
"database/sql"
"encoding/json"
"errors"
"fmt"
"html/template"
@yudppp
yudppp / date.go
Last active June 15, 2018 08:09
Go date.Date
package date
import (
"database/sql/driver"
"encoding/json"
"errors"
"fmt"
"time"
)
@yudppp
yudppp / Dockerfile
Last active August 17, 2017 08:50
kube job remover
FROM alpine
ENV KUBECTL_VERSION v1.5.3
ADD https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl /bin/kubectl
RUN chmod +x /bin/kubectl
# Delete successed job after 2 hours ago
CMD while true; do kubectl get job | awk '{ if(match($4, /^([2-9]h|[1-2][0-9]h|[0-9]+d)$/) && ($3==1)) print $1}' | xargs -n 1 --no-run-if-empty kubectl delete job; sleep 600s; done
@yudppp
yudppp / main.go
Created May 8, 2017 05:32
goduplication check
package main
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"path"
@yudppp
yudppp / mem.go
Last active October 7, 2015 13:16
use memcached go
package main
import (
"encoding/json"
"sync"
"github.com/bradfitz/gomemcache/memcache"
)
var once = &sync.Once{}