Skip to content

Instantly share code, notes, and snippets.

@llitfkitfk
Last active June 21, 2019 02:55
Show Gist options
  • Select an option

  • Save llitfkitfk/5171b39594ebe61ad10097e9e725c03d to your computer and use it in GitHub Desktop.

Select an option

Save llitfkitfk/5171b39594ebe61ad10097e9e725c03d to your computer and use it in GitHub Desktop.
Quick Command
quick cmd:
1. docker
2. backup
3. rsync
4. curl
5. ssh-keygen
curl -fsSL https://get.docker.com | CHANNEL=stable  sh

compose:

curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

macOS:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

# exit
ctrl + a & ctrl + d

windows:

# cmd.exe
docker run --privileged -it -v /var/run/docker.sock:/var/run/docker.sock jongallant/ubuntu-docker-client 
docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
chroot /host
tar -cvzf data.tar.gz ./data
tar -xvf data.tar.gz
rsync -avzh /path/to/src /path/to/dest

 
Usage: rsync [OPTION]... SRC [SRC]... DEST
  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST
  or   rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST
  or   rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST
  or   rsync [OPTION]... [USER@]HOST:SRC [DEST]
  or   rsync [OPTION]... [USER@]HOST::SRC [DEST]
  or   rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]
The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect
to an rsync daemon, and require SRC or DEST to start with a module name.
curl -fsSL -o /tmp/file <url>
ssh-keygen -t rsa -f plays/templates/ssh/id_rsa -C ssh@key -P ""
mv *.docx ~/Documents/docs/words
mv *.doc ~/Documents/docs/words
mv *.zip ~/Documents/docs/codes
mv *.xls ~/Documents/docs/excels
mv *.xlsx ~/Documents/docs/excels
mv *.zip ~/Documents/docs/codes
mv *.md ~/Documents/docs/mds
mv *.epub ~/Documents/docs/epubs
mv *.pdf ~/Documents/docs/pdfs
mv *.Pdf ~/Documents/docs/pdfs
// Copyright 2019 paul@wizmacau.com.  All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment