Small Configuration Hints

This blog post is just a few notes to myself about some miscellaneous things.

Firefox Config

When installing a firefox anew. Set these settings for increased privacy.

Goto about:preferences#privacy. Under Tracking check tell sites I do not want to be tracked. Under History choose Use custom settings for history, check Always use private browsing mode, and after a browser restart check accept cookies from sites but set Accept third-party cookies to Never.

In about:preferences#search uncheck "show search suggestions", and if you can find where the ddg.xml file is, then add the kd=-1 and kz=-1 options.

In about:config set the following booleans:


Addons to use:

.htaccess file

# For extension-less URLs
Options +MultiViews

# Custom 404 documents
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

# Proper MIME type for unknown files.
DefaultType None

# Text should always be utf-8
AddDefaultCharset utf-8

Command line snippets

# Start a Python 3 Basic file server.
python -m http.server 8080

# Pretty print JSON.
python -m json.tool

# Convert a 8.5x11in SVG file to a 8.5x11in PDF file.
rsvg-convert -f pdf -o output.pdf --width=612 --height=792 input.svg

# Fill free disk space with 0xff.
tr '\000' '\377' < /dev/zero > zero.fill; sync; rm zero.fill; sync

# Encode to webm at a decent quality. From Miro Video Converter.
ffmpeg -i input.avi -vcodec libvpx -g 120 -lag-in-frames 16 -deadline good -cpu-used 0 -vprofile 0 -qmax 63 -qmin 0 -b:v 768k -acodec libvorbis -ab 112k -ar 48000 -f webm output.webm

# Recursive sha1sum.
find -type f -print0 | xargs -0 sha1sum | sed -e 's/ \.\// /g' > /tmp/sha1sum-unsorted.txt

# Hex dump and undump.
xxd -g 1 input.bin > output.hexdump
cut -c 11-58 input.hexdump | xxd -ps -r > output.bin