Skip to content

Instantly share code, notes, and snippets.

View chrolis's full-sized avatar

chrolis

View GitHub Profile
#!/usr/bin/env bash
set -uex
umask 0077
export LANG=C
if [[ $# -lt 5 ]]; then
echo "usage: $0 <profile> <private-key> <target> <port> <user>" >&2
exit 1
fi
@chrolis
chrolis / .zshrc
Created January 6, 2020 16:00
zshrc
fpath+=(~/.zsh/completion)
zstyle ':completion:*' use-cache true
zstyle ':completion:*:default' menu select=1
#zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
source ~/.zplugin/bin/zplugin.zsh
@chrolis
chrolis / ec2-prices.py
Last active May 7, 2019 13:07
EC2 インスタンス価格表を sqlite3 するやつ
import re
import sqlite3
from contextlib import closing
from typing import List
import requests
def insert(conn: sqlite3.Connection, prices: List):
c = conn.cursor()
@chrolis
chrolis / update_rfs.sh
Last active December 26, 2018 08:55
RFS/RPS/XPS 自動設定する君
#!/bin/sh
# references:
# - https://blog.yuuk.io/entry/linux-networkstack-tuning-rfs
# - https://qiita.com/saitara/items/aabb9c8869079ceb96a2
# - https://www.greptips.com/posts/1119/
set -ue
rps_sock_flow_entries=32768
@chrolis
chrolis / mktemp.sh
Created June 2, 2017 07:41
temp directory snippet
#!/usr/bin/env bash
unset tmpdir
atexit() {
[[ -n ${tmpdir-} ]] && rm -rf "$tmpdir"
}
trap atexit EXIT
trap 'trap - EXIT; atexit; exit -1' INT PIPE TERM
tmpdir=$(mktemp -d "/tmp/${0##*/}.tmp.XXX")
@chrolis
chrolis / dakimakura-brands.md
Last active September 6, 2021 16:46
オリジナル抱き枕カバーブランド一覧
@chrolis
chrolis / hestia.txt
Last active August 29, 2015 14:20
ヘスティア本/グッズ出すサークル簡易まとめ
ヘスティア本/グッズ出すサークル簡易まとめ
- あ36a みりおんばんく http://www7a.biglobe.ne.jp/~million-bank/circle.html
- あ69 クレスタ http://clesta.net/comic19/hanp.jpg
- あ46b slice slime http://sliceslime.blog.fc2.com/blog-entry-67.html
- い26a 悠々亭 http://yuyutei.sakura.ne.jp/
- せ22b 富士浅間堂
- ふ38a ショコラテ http://latte.candypop.jp/
- し07a xoxoメロン https://twitter.com/xoxomelon/status/593738532742561793
- ね01b むげん@WORKS http://mugen-works.com/article/123393925.html
- あ13b moco chouchou https://twitter.com/hisama_kumako/status/593337307836522496