Skip to content

Instantly share code, notes, and snippets.

package main
// queryが途中で途切れる場合は performance_schema_max_sql_text_length を引き上げる
// https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_max_sql_text_length
import (
"context"
"database/sql"
"encoding/csv"
"flag"
@matsuu
matsuu / .tmux.conf
Last active June 20, 2023 12:19
xxh configuration
# ~/.xxh/.xxh/plugins/xxh-plugin-prerun-dotfiles/home/.tmux.conf
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
set-option -g default-terminal "screen-256color"
set-option -g pane-active-border-style fg=red
@matsuu
matsuu / Vagrantfile
Created May 15, 2021 12:30
isucon9-final
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = "ubuntu/bionic64"
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
@matsuu
matsuu / exclude.ovpn
Last active April 26, 2021 04:50
openvpn ビデオチャット系IPアドレス帯除外設定
# Discord Japan
route 103.194.164.0 255.255.252.0 net_gateway
# Google Meet
# https://support.google.com/a/answer/1279090
route 74.125.250.0 255.255.255.0 net_gateway
# Skype/Teams
# https://docs.microsoft.com/ja-jp/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams
@matsuu
matsuu / build.sh
Last active April 24, 2021 22:37
isucon10-qualify provisioning script
#!/bin/sh
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends ansible git
GITDIR="/tmp/isucon10-qualify-base"
rm -rf ${GITDIR}
git clone https://github.com/isucon/isucon10-qualify.git ${GITDIR}
@matsuu
matsuu / goldrush.yml
Last active February 24, 2021 11:15
Github Actions Workflow for HighLoad Cup 2021
name: Build and Publish Docker for HighLoad Cup 2021
on:
push:
branches:
- main
- master
jobs:
docker:
@matsuu
matsuu / log
Created January 6, 2021 14:18
isucon10q deno build log
#10 0.333 deno bundle app.ts > isuumo
#10 0.336 Bundle file:///deno/app.ts
#10 0.338 Download https://deno.land/x/case/mod.ts
#10 0.338 Download https://deno.land/x/oak/mod.ts
#10 0.339 Download https://deno.land/x/multiparser/mod.ts
#10 0.339 Download https://deno.land/std/fmt/printf.ts
#10 0.340 Download https://raw.githubusercontent.com/denjucks/organ/master/mod.ts
#10 0.340 Download https://deno.land/std/encoding/csv.ts
#10 0.341 Download https://deno.land/x/mysql/mod.ts
#10 0.698 Download https://raw.githubusercontent.com/denjucks/organ/master/deps/basic-auth/index.js
@matsuu
matsuu / settings.json
Last active January 6, 2021 13:41
Windows Terminal Settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{...}",
"profiles":
{
"defaults":
{
"colorScheme": "Tango Dark",
"cursorShape": "emptyBox",
"fontFace": "HackGenNerd Console",
@matsuu
matsuu / 0001-benchmarker-patch.patch
Created October 4, 2020 00:03
本番環境でbenchmarkerが動作するように修正したpatch
From 9c7104201bfd484f0cb8e9350ccb94a16504b5d6 Mon Sep 17 00:00:00 2001
From: MATSUU Takuto <matsuu@gmail.com>
Date: Sat, 3 Oct 2020 23:55:09 +0000
Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E7=95=AA=E7=92=B0=E5=A2=83=E3=81=A7be?=
=?UTF-8?q?nchmarker=E3=81=8C=E5=8B=95=E4=BD=9C=E3=81=99=E3=82=8B=E3=82=88?=
=?UTF-8?q?=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9Fpatch?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@matsuu
matsuu / user-data
Last active September 7, 2020 13:17
user-data for isucon9q
#cloud-config
password: isucon
chpasswd:
expire: False
ssh_pwauth: True
write_files:
- content: |
#!/bin/sh
set -e