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 / nginx.conf
Last active Oct 28, 2019
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)(/.*); # CVE-2019-11043
set $path_info $fastcgi_path_info;
# PATH_INFOを考慮するため$uriではなく$fastcgi_script_nameでチェック
try_files $fastcgi_script_name =404;
@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"
View ime.js.patch
--- ime.js.orig 2008-10-21 12:05:50.000000000 +0900
+++ ime.js 2010-09-20 02:25:31.065991013 +0900
@@ -22,7 +22,7 @@
}
function getComputedStyle(element, pseudo){
return {
- currentStyle : element.currentStyle,
+ currentStyle : element.currentStyle || {},
getPropertyValue : function(prop){
return this.currentStyle[capitalize(prop)];
@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 / 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,
View gist:1649
#!/system/bin/sh
#
# VALUES (_id,name,numeric,mcc,mnc,apn,user,server,password,proxy,port,mmsproxy,mmsport,mmsc,current)
#
SQLITE="/system/bin/sqlite3"
DB="/data/data/com.google.android.providers.telephony/databases/telephony.db"
# Telecom New Zealand
@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
View create_gentoo_ami.sh
#!/bin/sh
#===============================================================================
#
# USAGE
# =====
#
# Get your X.509 Certificates and Private Key
# -------------------------------------------
You can’t perform that action at this time.