Skip to content

Instantly share code, notes, and snippets.

@yufengwng
yufengwng / arch_cheatsheet.txt
Last active November 9, 2024 23:45
Arch Linux Commands Cheatsheet
pacman
======
view logs: /var/log/pacman.log
update system
# pacman -Syu
list installed packages
# pacman -Q
@yufengwng
yufengwng / zipping.txt
Created March 26, 2015 02:56
Commands for archiving and zipping files.
tar
===
create new gunzipped tar
$ tar cvzf <name>.tar.gz file <files>
extract from gunzipped tar
$ tar xvzf <name>.tar.gz
list contents of gunzipped tar
@yufengwng
yufengwng / usb.txt
Created November 24, 2016 15:25
Commands for managing usb devices
view device filesystems
$ lsblk -f
view devices
$ udiskctl status
view device info
$ udiskctl info -b /dev/<id>
mount partition
@yufengwng
yufengwng / doctl_zsh_completion.sh
Created March 29, 2017 00:20
ZSH completion file for doctl.
# ZSH completion script for doctl.
#
# This takes bach completion and converts it to support zsh.
# Inspired by [kubectl][kc] and [opencompose][oc], the bash
# part is from [@andewsomething][as-gist].
#
# [kc]: https://github.com/kubernetes/kubernetes/blob/9dec47d/pkg/kubectl/cmd/completion.go
# [oc]: https://github.com/redhat-developer/opencompose/blob/master/pkg/cmd/completion.go
# [as-gist]: https://gist.github.com/andrewsomething/7ba993a7f7897936c6946ffed2f1edc6
@yufengwng
yufengwng / public_ip.txt
Created May 16, 2018 03:18
Get public IP address programmatically
$ curl -si https://ipinfo.io