π»
π»
π»
π»
Today I Learned
Searchβ¦
π»
π»
π»
π»
Today I Learned
README
analytics
bash
db
dgraph
docker
git
go
k8s
linux
net
osx
python
react
unix
Find lines that matches on 2 different sorted file
bulk renaming multiple file
convert pdf to text using ocr
diff output of 2 command
encryption with gpg
extend letsencrypt certificate with dns challenge
ffmpeg monitor and restart stream when it hung or stall
file size older than x days
filtering json with jq
find out what is using swap
fish environment variables from 1password
formatting or parse json in command line
get all line except n last one
grep print only matched
jq extracting properties to arrays from json row line
keep n recent item in folder
open last command in the editor with fc
parsing epoch timestamp to date
pbcopy alternative for copying to clipboard
process pipe operator
record a web stream to youtube
regex for validating password
rename tmux window
repeat content of text x time
replacing last command and execute it
reusing last command argument
send slack message from command line
sending curl post with file
sort file inline
specify compression level in tar gzip
zsh ctrl p same behavior as up arrow
vim
Powered By
GitBook
encryption with gpg
Generate key
$ gpg --gen-key
List keys
$ gpg --list-keys
Encrypt Data
With a passprhare
$ gpg -ca -o output.txt.gpg input.txt
with a certificate and from STDOUT
$ gpg -ea
or if you know the name already (can be key, name or email)
$ gpg -ea -r
"Ahmy"
Decrypt Data
$ gpg -d file.txt.gpg
Export
Public key
$ gpg --export -a
"name"
>
public.key
-a
is to create armored ascii output.
Private Key
$ gpg --export-secret-key -a
"name"
>
private.key
Import
Public key
$ gpg --export-secret-key -a
"name"
>
private.key
Private Key
$ gpg --allow-secret-key-import --import private.key
Deleting
Public Key
$ gpg --delete-key
"Real Name"
Private Key
$ gpg --delete-secret-key
"Real Name"
Extend the expiration
gpg --edit-key "name"
Select the key to extend
gpg> key 1
gpg> expire
Send key to a key server
gpg --keyserver keyserver.ubuntu.com --send-key "name"
Previous
diff output of 2 command
Next
extend letsencrypt certificate with dns challenge
Last modified
7mo ago
Copy link
Outline
Generate key
List keys
Encrypt Data
Decrypt Data
Export
Import
Deleting
Extend the expiration
Send key to a key server