Skip to content

Instantly share code, notes, and snippets.

MATSUU Takuto matsuu

Block or report user

Report or block matsuu

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
@matsuu
matsuu / Vagrantfile
Created Sep 10, 2019
isucon9-qualifier
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
#box = "ubuntu/bionic64"
box = "bento/ubuntu-18.04"
# 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.
@matsuu
matsuu / font-hackgen.rb
Last active Aug 7, 2019
brew cask install font-hackgen.rb
View font-hackgen.rb
cask 'font-hackgen' do
version '1.2.1'
sha256 '04f470fd90e4d6560614647608b6f7185877b9c08536028d60d289f9a162cb23'
url "https://github.com/yuru7/HackGen/releases/download/v#{version}/HackGen_v#{version}.zip"
appcast 'https://github.com/yuru7/HackGen/releases.atom'
name 'HackGen'
homepage 'https://github.com/yuru7/HackGen'
font "HackGen_v#{version}/HackGen-Bold.ttf"
@matsuu
matsuu / Dockerfile
Created Nov 25, 2018
Dockerfile for rhel-8-beta
View Dockerfile
FROM centos:7
ARG install_groups=Core
ARG target=/target
# based on https://github.com/moby/moby/blob/master/contrib/mkimage-yum.sh
RUN \
yum install -y curl && \
curl -sLO http://downloads.redhat.com/redhat/rhel/rhel-8-beta/rhel-8-beta.repo && \
mkdir -m 755 "$target" && \
@matsuu
matsuu / GDPR.md
Last active Sep 11, 2018 — forked from zero-master/GDPR.md
Show visitors from EU countries a page with GDPR message using Cloudflare and .htaccess
View GDPR.md
@matsuu
matsuu / spec.md
Created Feb 9, 2018
alibaba cloud CentOS 7.4
View spec.md

/etc/redhat-release

CentOS Linux release 7.4.1708 (Core)

rpm -qa | sort

GeoIP-1.5.0-11.el7.x86_64
@matsuu
matsuu / nginx.conf
Last active May 24, 2018
nginxでPATH_INFO
View nginx.conf
location ~ \.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
# $fastcgi_path_info は別変数に格納し直さないとなぜか使用できない
fastcgi_split_path_info ^(.*?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
# PATH_INFOを考慮するため$uriではなく$fastcgi_script_nameでチェック
try_files $fastcgi_script_name =404;
@matsuu
matsuu / slow_query.sql
Last active Jul 23, 2018
performance_schemaを使用したスロークエリー抽出
View slow_query.sql
-- ORDER BYとLIMITは必要応じて適宜修正
-- VIEWを作成すると便利
SELECT
count_star AS cnt,
sum_timer_wait/1e12 AS sum,
min_timer_wait/1e12 AS min,
avg_timer_wait/1e12 AS avg,
max_timer_wait/1e12 AS max,
sum_rows_sent AS sumRows,
sum_rows_sent/count_star AS avgRows,
@matsuu
matsuu / .sshrc
Created Sep 10, 2016
.sshrc for golang
View .sshrc
export SHELL=`which bash`
export VIMINIT="let \$MYVIMRC='$SSHHOME/.sshrc.d/.vimrc' | source \$MYVIMRC"
MYNAME="matsuu"
SSHRCDIR="/tmp/.$MYNAME.sshrc"
VIMRUNTIME="${HOME}/.$MYNAME.vim"
if ! [ -d $SSHRCDIR ]; then
rm -rf $SSHRCDIR
mkdir -p $SSHRCDIR
@matsuu
matsuu / gist:7619214786da47f53480
Created Nov 3, 2015
isucon5-final メモリ360MBのbench/api/imageで実行結果
View gist:7619214786da47f53480
{
"valid" : false,
"requests" : 901,
"elapsed" : 84142,
"done" : "[{Init},{Bootstrap},{Checker,ModifyLoader,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load,Load}]",
"responses" : {
"success" : 626,
"redirect" : 81,
"failure" : 0,
@matsuu
matsuu / gist:cfbb2011ff26bae169b7
Created Oct 10, 2015
ISUCON5予選でVarnish+Go+MySQLのチューニング結果kataribe
View gist:cfbb2011ff26bae169b7
Top 20 Sort By Total
Count Total Mean Stddev Min P50.0 P90.0 P95.0 P99.0 Max 2xx 3xx 4xx 5xx Request
5229 66.465437 0.012710926946 0.034604447159 0.000048 0.007606 0.024237 0.033053 0.065440 0.840270 5174 55 0 0 GET http://10.240.0.2/ HTTP/1.1
5140 25.235860 0.004909700389 0.016284854639 0.000372 0.003515 0.007652 0.009250 0.020766 0.302943 5098 42 0 0 GET http://10.240.0.2/diary/entries/.* HTTP/1.1
5125 21.480807 0.004191376976 0.004016605418 0.000292 0.003756 0.006168 0.007544 0.015719 0.106907 5082 43 0 0 GET http://10.240.0.2/profile/.* HTTP/1.1
5105 14.416280 0.002823952987 0.001943146755 0.000365 0.002494 0.004384 0.005646 0.011386 0.032303 5059 45 1 0 GET http://10.240.0.2/diary/entry/.* HTTP/1.1
1710 13.777080 0.008056771930 0.004159773227 0.000375 0.006785 0.013854 0.016593 0.022530 0.028759 1698 12 0 0 GET http://10.240.0.2/footpri
You can’t perform that action at this time.