Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
👁️
👄👁👂

pokutuna pokutuna

👁️
👄👁👂
View GitHub Profile
@pokutuna
pokutuna / main.go
Last active January 28, 2023 04:40
package main
import (
"flag"
"image"
"log"
"os"
_ "image/gif"
_ "image/jpeg"
FROM alpine:3.12.0
RUN mkdir /app
COPY print.sh /app
ENV PATH /app:$PATH
ENTRYPOINT ["print.sh"]
@pokutuna
pokutuna / main.go
Created July 8, 2019 12:46
context
package main
import (
"fmt"
"net/http"
"strconv"
"time"
)
type handler struct{}
@pokutuna
pokutuna / txtimeout.go
Created March 11, 2019 06:18
context with transaction
package main
import (
"context"
"fmt"
"time"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
@pokutuna
pokutuna / lock_empty.sh
Created March 7, 2019 05:12
gap lock dead lock rock you
#!/bin/sh
cat <<EOS | mysql -uroot
CREATE DATABASE IF NOT EXISTS lock_test;
USE lock_test;
DROP TABLE IF EXISTS example;
CREATE TABLE example (
id bigint unsigned NOT NULL,
name VARCHAR(10) NOT NULL,
count int NOT NULL,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
@pokutuna
pokutuna / README.md
Last active January 17, 2019 05:25
pomoslack

pomoslack

スクリプトエディタでアプリケーションとして書き出すと便利

{
"title": "mousekey(s+d)",
"rules": [
{
"description": "mousekey(s+d)",
"manipulators": [
{
"type": "basic",
"from": {
"simultaneous": [
{
"dependencies": {
"puppeteer": "^1.5.0",
"speedline": "^1.3.3"
}
}
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 2 columns, instead of 1. in line 4.
支払日,2017年06月05日
会員氏名, 保登心愛
カード名,ライフ・マスターカード
当月ご請求金額 合計(弁済金・分割支払金),78088
当月ご請求金額 内訳
回数指定払い,78088
リボルビング,
カード保険料・カード年会費・ETC年会費,
カード再発行手数料,
<!DOCTYPE html>
<html lang="ja">
<head>
<script src="./index.js"></script>
</head>
<body>
<div id="outer">
<div id="inner"></div>
</div>