Misc¶
Paperkey¶
Export gpg key to a printable version
https://wiki.archlinux.org/index.php/Paperkey
Public Keys¶
Timezone¶
$ sudo timedatectl set-timezone America/Los_Angeles
Images¶
Imagemagick¶
# Ubuntu
$ sudo apt-get install sudo apt install imagemagick-6.q16hdri
# Convert image from ico to png
$ convert "favicon.ico" -thumbnail 16x16 -alpha on -background none -flatten "favicon.png"
Shred¶
Overwrite the data of file1.txt, file2.jpg, and file3.doc using the default shredding methods.
$ shred -u file1.txt file2.jpg file3.doc
Combine PDFs¶
$ qpdf --empty --pages *.pdf -- out.pdf
List if a Package is Installed¶
apt -qq list <package name>
Disk Free Space¶
df -h
List Hardware¶
sudo lshw -short
UID¶
id -u $(whoami)
GID¶
id -g $(whoami)
Screen¶
Quit a session
screen -XS <session-id> quit
Check current session
echo $STY
Detached the previous screen and allowed me to reattach.
screen -d -r
Scroll upward in the terminal
C-a [
Replace Entire Line in File¶
sed -i "s|^type =.*$|type = mysql|g" config.ini
keepachangelog¶
Quit Screen Sessions¶
List screen ids
screen -list
Quit the session
screen -XS <session-id> quit