Every once in a while, I find and/or write some tool that makes life easier for me in one way or another and add it here. Plus, sometimes I find some cool snippets of code and figure, "Why not put 'em here?" I'd appreciate any
suggestions you may have, by the way.
- You should be using SuperGenPass to make "passwording" easier online. For a guarantee of security, I'd recommend the mobile version.
- Hide your email address from spam bots
- My Linux bash aliases.
- My vim .vimrc.
- To combine several PDFs into one:
| $ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf file1.pdf file2.pdf |
|
- To split a PDF:
| $ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dFirstPage=m -dLastPage=n -sOutputFile=out.pdf in.pdf |
|
- To rotate a PDF counterclockwise by 90 degrees:
| $ pdftk in.pdf cat 1-endwest output out.pdf |
|
- To list duplicate files by hash:
| $ find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum \ |
| | sort | uniq -w32 --all-repeated=separate |
|
- To convert a LaTeX document to ODT and DOCX:
| $ latex2html in.tex -split 0 -no_navigation -info "" -address "" -html_version 4.0,unicode |
| $ libreoffice --headless --convert-to odt:"OpenDocument Text Flat XML" in/index.html |
| $ libreoffice --headless --convert-to docx:"MS Word 2007 XML" in/index.html |
|
- To rotate a video clockwise 90 degrees:
| $ ffmpeg -i <input_video> -vf "transpose=1" -r 30 -sameq <output_video> |
|
- To force a file system check on reboot (and reboot):
| $ sudo touch /forcefsck |
| $ sudo shutdown -r now |
|
- To mount ISOs:
| $ sudo mount -o loop -t iso9660 /path/to/file.iso /path/to/mount_point |
|
- To make a color in an image transparent using ImageMagick:
| $ convert -transparent "#hex_color" input_file output_file |
|
- To prevent key passphrases to be continuously prompted for in ssh sessions (once logged in via ssh):
| $ exec ssh-agent bash |
| $ ssh-add |
|