Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
NumCPU=$(grep -c ^processor /proc/cpuinfo)
NumJobs=$(calc -p "ceil(2*$NumCPU+1)")
export CONCURRENCY_LEVEL=$NumJobs
baseURL="https://www.kernel.org/pub/linux/kernel/v3.x/"
latest="$(curl -s $baseURL | sed -n 's|\(.*\)\(linux-\)\(.*\)\(\.tar\.xz<\)\(.*\)|\3|p' | sort --version-sort | tail -n1)"
[ ! "$latest" ] && { echo "Are we offline?" >&2; exit 1; }
@VolMi
VolMi / feeder
Last active December 22, 2015 17:59
stream precious random data to all intelligence services in the universe
#!/bin/bash
# Bashisms are embraced here and therefore used quite heavily.
#
# This script is meant to keep some folks a bit busy, who were never invited
# by yourself to share your data.
# The idea is that you use cloud storage to store your encrypted (real) files
# and additionally generate some randomized junk which should be
# indistinguishable from the encrypted data.
# We now do this by encrypting the junk as well.
#
@VolMi
VolMi / optimize_png.nemo_action
Last active December 17, 2015 10:38
Nemo action "Optimize PNG files"
[Nemo Action]
Active=true
Name=Optimize PNG files
Name[de]=PNG-Dateien optimieren
Comment=Reduce size of selected PNG files
Comment[de]=Die Dateigröße der gewählten PNG-Dateien reduzieren
Exec=optipng %F
@VolMi
VolMi / meld-diff.nemo_action
Created May 16, 2013 22:59
Nemo action "Compare with meld"
[Nemo Action]
Active=true
Name=Compare with meld
Name[de]=Mit meld vergleichen
Name[fr]=Comparer avec meld
Name[nl]=Vergelijk met meld
Comment=Show differences between files or directories
Comment[de]=Zeige Unterschiede zwischen Dateien oder Ordnern
@VolMi
VolMi / cachefill
Last active December 15, 2015 03:08
cache the files *you* consider important in RAM
#!/bin/bash
#
# cachefill -- warm up the file cache and buffer of the Linux kernel
#
# *****
# ONLY IF YOU HAVE A LOT OF MEMORY!
# I think, something like at least 8 GB for a regular Desktop
# *****
#
#