Skip to content

Instantly share code, notes, and snippets.

View cryptsetup.markdown

使用密码创建

sudo cryptsetup luksFormat /dev/sda2

使用key-file创建

  1. 生成key-file
dd bs=512 count=4 if=/dev/random of=/etc/mykeyfile iflag=fullblock
  1. 创建luks分区,指定key-file
@Perterually
Perterually / k8s-install.md
Created Oct 21, 2020 — forked from islishude/k8s-install.md
k8s-国内源安装
View k8s-install.md

MOVE TO HERE

注意以下命令,需要切换到 root 后运行

安装 docker

首先确定已经安装完成 docker,如果没有安装可以使用以下脚本快速安装并配置:

@Perterually
Perterually / mysql-backup-windows.bat
Created Apr 17, 2018 — forked from sindresorhus/mysql-backup-windows.bat
Backup MySQL databases in separate gzipped sql files on Windows
View mysql-backup-windows.bat
@echo off
set dbUser=root
set dbPassword=password
set backupDir="C:\Documents and Settings\user\Desktop\backup\mysql"
set mysqldump="C:\Program Files\MySQL\MySQL Workbench 5.2 CE\mysqldump.exe"
set mysqlDataDir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data"
set zip="C:\Program Files\7-Zip\7z.exe"
:: get date
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@Perterually
Perterually / tmux.md
Created Dec 23, 2016 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a