-
Uncompress original pdf file to text file.
pdftk original.pdf output uncompressed.pdf uncompress
-
replace watermark strings to empty.
sed -i "s/watermarktextstring//g" uncompressed.pdf
-
Compress the edited text file back to pdf file.
pdftk uncompressed.pdf output fixed.pdf compress
-
Print the 1st,3rd,5th columns
awk -F ',' '{print $1,$3,$5}' input.csv
-
Add a header before print
awk -F ',' 'BEGIN {print "index,col1,col2"} {print $1,$3,$5}' input.csv
-
Use comma to seperate output, OFS for "output field seperator"
awk -F ',' '{OFS=","}{print $1,$3,$5}' input.csv
-
Change print to printf
awk -F ',' 'BEGIN {print "index,col1,col2"} {printf("%s,%s,%s\n",$1,$3,$5}' input.csv
date +%s | sha256sum | base64 | head -c 32 ; echo
- Make sure the ownerships of user ufo are:
- 700 for
/home/ufo
- 700 for
/home/ufo/.ssh
- 600 for
/home/ufo/.ssh/authorized_keys
- Put
~/Anaconda3/condabin
in system search path - Run
conda config --set auto_activate_base true
to activate base env when terminal starts (doesn't work for windows dos somehow)
- DOS
wmic NIC where NetEnabled=true get Name, Speed
ref - POWERSHELL
Get-NetAdapter | where Status -eq "Up" | select InterfaceDescription, LinkSpeed
ref - BASH
sudo ethtool <interface> | grep Speed
ref orcat /sys/class/net/<interface>/speed
ref
Prepare a Start-up Script for Windows DOS Terminal (similar as ~/.bashrc in linux) ref
-
Edit the
"%"USERPROFILE"%\init.cmd"
script (script location could be anywhere) and put in commands such asactivate
for conda environment. -
Run
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun ^ /t REG_EXPAND_SZ /d "%"USERPROFILE"%\init.cmd" /f
-
To remove the start-up operation, run
reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun
- mount
sudo sshfs -o allow_other username@serveIP:remote_folder local_mount_point
- unmount
sudo fusermount -u local_mount_point