Skip to content

Instantly share code, notes, and snippets.

View k2tzumi's full-sized avatar
🚴‍♂️

Katsumi Kato k2tzumi

🚴‍♂️
View GitHub Profile
@k2tzumi
k2tzumi / sample.graphql
Created October 17, 2017 08:06
GraphQLサンプル
# refs http://graphql.org/graphql-js/mutations-and-input-types/
input MessageInput {
content: String
author: String
}
type Message {
id: ID!
content: String
author: String
@k2tzumi
k2tzumi / refactoring_hello.puml
Created October 17, 2017 06:30
DSLを意識してまとめたシーケンス図
@startuml
title 挨拶のシーケンス
actor Author as "わたし"
actor Reader as "あなた"
group sayHello
Author -> Reader : こんにちは
activate Reader
Reader --> Author : こんにちは
@k2tzumi
k2tzumi / hello.puml
Created October 17, 2017 06:28
一番簡単なシーケンス図
@startuml
わたし -> あなた : こんにちは
@enduml
@k2tzumi
k2tzumi / login_form.puml
Last active October 17, 2017 06:22
login_form.uml
@startsalt
{+
メールアドレス <&envelope-closed> | "◯◯@XXX.com "
パスワード <&key> | "**** "
.| { [ キャンセル ] | [ ログイン ] }
}
@endsalt
@k2tzumi
k2tzumi / unicode_hex_output.rb
Last active July 21, 2016 02:20
Unicodeの文字コードの確認方法
"ァ-ヶー・".each_codepoint { |cp| $stdout << "U+" << cp.to_s(16) << " " }
@k2tzumi
k2tzumi / docker.log
Created July 9, 2016 03:25
tc-proxy output log
==> /var/log/squid/access.log <==
172.17.0.1 - - [09/Jul/2016:03:17:46 +0000] "GET http://voyagegroup.com/ HTTP/1.1" 200 6566 TCP_MISS:HIER_DIRECT
172.17.0.1 - - [09/Jul/2016:03:17:46 +0000] "GET http://voyagegroup.com/common/js/lib/jquery.flatheights.js HTTP/1.1" 200 4121 TCP_MISS:HIER_DIRECT
172.17.0.1 - - [09/Jul/2016:03:17:46 +0000] "GET http://voyagegroup.com/common/js/checkOtherLangUrl.js HTTP/1.1" 200 1167 TCP_MISS:HIER_DIRECT
172.17.0.1 - - [09/Jul/2016:03:17:46 +0000] "GET http://voyagegroup.com/common/js/base.js HTTP/1.1" 200 11937 TCP_MISS:HIER_DIRECT
172.17.0.1 - - [09/Jul/2016:03:17:46 +0000] "GET http://voyagegroup.com/common/css/base.css HTTP/1.1" 200 11396 TCP_MISS:HIER_DIRECT
@k2tzumi
k2tzumi / 3g.sh
Last active July 17, 2016 12:37
3G Traffic Control
#!/bin/bash
# Traffic Control
tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbps ceil 1000kbps
tc qdisc add dev eth0 parent 1:12 netem delay 200ms
@k2tzumi
k2tzumi / docker-compose.yml
Last active July 20, 2016 01:32
tc-proxy compose
version: '2.0'
networks:
default:
services:
squid:
build:
context: .
dockerfile: Dockerfile
args: