Skip to content

Instantly share code, notes, and snippets.

View acro5piano's full-sized avatar
🏠
Working from home

Kay Gosho acro5piano

🏠
Working from home
View GitHub Profile
@acro5piano
acro5piano / .tmux.conf
Last active November 10, 2016 11:53
TmuxでEmacsのキーバインド ref: http://qiita.com/acro5piano/items/ca5aa847070b85854d17
set-window-option -g mode-keys emacs
bind-key C-t copy-mode
bind-key C-y paste-buffer
bind -n Pageup copy-mode -u
@acro5piano
acro5piano / file1.txt
Last active November 12, 2016 05:22
Go言語で、外部エディタを起動する ref: http://qiita.com/acro5piano/items/69870a942ce1b5ea46ad
go run vim.go
@acro5piano
acro5piano / Dockefile
Created November 18, 2016 03:53
Dockerコンテナに入れたRubyで、Encoding::InvalidByteSequenceError ref: http://qiita.com/acro5piano/items/ceb2abf79d2bab651824
FROM ubuntu:14.04
RUN sed -i -e 's/\/\/archive.ubuntu.com/\/\/ftp.jaist.ac.jp\/pub\/Linux/g' /etc/apt/sources.list
RUN apt-get -y update && apt-get install -y wget gcc
RUN apt-get install -y \
build-essential \
libffi-dev \
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev \
sqlite3 libsqlite3-dev
@acro5piano
acro5piano / crontab
Last active May 23, 2018 16:05
ホスト側のCronで docker run する ref: https://qiita.com/acro5piano/items/a9ec64f78e7da304a661
* * * * * docker exec some-container some-command
@acro5piano
acro5piano / file0.txt
Last active November 21, 2016 08:40
Bash/Zshで、直前に実行したコマンドの引数を呼び出す ref: http://qiita.com/acro5piano/items/301323d2d353324a510b
1. ls -l /etc/hoge/fuga.conf
2. chmod 0600 /etc/hoge/fuga.conf
3. vim /etc/hoge/fuga.conf
@acro5piano
acro5piano / file0.txt
Last active November 22, 2016 15:56
Linuxを起動するとA start job is running for sys-subsystem-net-devices-wls3.deviceでネットに繋がらない ref: http://qiita.com/acro5piano/items/528285ceabd427eaf37a
Job for netctl@wlp3s0\x2dSSID名.service failed because the control process exited with error code.
See "systemctl status "netctl@wlp3s0\\x2dSSID名.service"" and "journalctl -xe" for details.
@acro5piano
acro5piano / 変更前
Created November 26, 2016 10:45
LogstashをElasticsearchと連携させる時の設定ファイルの書式が5.0で変更になった ref: http://qiita.com/acro5piano/items/83f938756c0db10b3b4d
output {
elasticsearch {
host => elasticsearch
port => 9200
}
}
(defun ido-git-grep()
(interactive)
(setq user-input-line
(split-string
(ido-completing-read
"git-grep:"
(split-string (shell-command-to-string
(format "git grep -n %s" (read-string "keyword:")))
"\n"))
":"))
@acro5piano
acro5piano / Dockerfile
Last active November 29, 2016 14:47
Dockerで実行ユーザーとグループを指定する ref: http://qiita.com/acro5piano/items/8cd987253cb205cefbb5
USER 1000:1000
@acro5piano
acro5piano / enp2s0
Created December 2, 2016 03:48
Arch Linuxで固定IPを簡単に設定する ref: http://qiita.com/acro5piano/items/b590ac7d75f6ceaa3f12
Description='A basic static ethernet connection'
Interface=enp2s0
Connection=ethernet
IP=static
Address=('192.168.25.219')
Gateway='192.168.24.254'
DNS=('192.168.4.10', '192.168.4.12')