Skip to content

Instantly share code, notes, and snippets.

@atton
atton / gist:ddf851658a606fe2de0c6960255d00d1
Created October 8, 2017 23:18
Time Machine Local Backup
raven% df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 974700800 716893256 257295544 74% 2759317 4292207962 0% /
devfs 366 366 0 100% 634 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
localhost:/hogehogefugafugapiyopi 974700800 974700800 0 100% 0 0 100% /Volumes/MobileBackups
@atton
atton / a.txt
Last active October 9, 2017 12:05
Output by virsh vol-list
# virsh vol-list a
Name Path
------------------------------------------------------------------------------
hoge.img /path/to/a/hoge.img
@atton
atton / docker
Created October 10, 2017 07:48
Docker configuration which change data location
# /etc/sysconfig/docker
OPTIONS='--selinux-enabled -g /path/to/directory'
* hard core unlimited
* soft core unlimited
@atton
atton / ifcfg-bond0
Created October 23, 2017 04:41
CentOS 7 bonding configurations
DEVICE=bond0
BOOTPROTO=none
TYPE=Bond
ONBOOT=yes
BONDING_OPTS="mode=4 miimon=100 lacp_rate=1 xmit_hash_policy=layer2+3"
@atton
atton / ifcfg-bond0.111
Last active October 23, 2017 04:56
CentOS7 VLAN configurations
DEVICE=bond0.111
BOOTPROTO=none
ONBOOT=yes
VLAN=yes
BRIDGE=br111
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "[email protected]" ];
then
GIT_AUTHOR_NAME="atton";
GIT_AUTHOR_EMAIL="[email protected]";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
@atton
atton / config
Created November 13, 2017 09:11
~/.ssh/config for Amazon EC2
host ec2
user ubuntu
hostname 1.2.3.4
identityfile ~/.ssh/id_hoge
00 03 03 * * /bin/systemctl stop nginx; /usr/bin/letsencrypt renew; /bin/systemctl start nginx
@atton
atton / .gitconfig
Created November 26, 2017 00:17
Show warning message if you have merge lines using git-hooks(pre-commit). Details: https://attonblog.blogspot.jp/2017/11/git-pre-commit-hook.html
[core]
hooksPath = ~/.config/git/hooks