Skip to content

Instantly share code, notes, and snippets.

@leeeeeeeee2
leeeeeeeee2 / bash extract all tar.gz
Created February 19, 2023 02:45
bash_extract_all_targz
for f in *.tar.gz; do tar xf "$f"; done
@leeeeeeeee2
leeeeeeeee2 / gist:8ad660d842c325c2f8d52591f7fd0f96
Last active February 20, 2023 09:04
Powser shell rename *.gz to *.tar.gz
# The GNU General Public License v3.0
Get-ChildItem -File -Filter '*.gz' |
ForEach-Object {
Move-Item -Path $_.FullName -Destination $($_.FullName -replace '^(.*)\.gz$', '$1.tar.gz')
}
@leeeeeeeee2
leeeeeeeee2 / pdf2tiff.sh
Created February 3, 2023 13:40
convert pdf to tiff in 600 dpi
#!/bin/sh
# from https://github.com/andrewpearce-digital/pdf2tiff/blob/master/pdf2tiff.sh
# Requires ghostscript
# ubuntu: sudo apt install ghostscript
FILECOUNT=0
TOTALSTARTTIME=$(date +"%s")
#Get all pdfs in process folder
for f in *.pdf
do