Skip to content

Instantly share code, notes, and snippets.


Mohak Shah mohakshah

  • Ahmedabad, India
View GitHub Profile
mohakshah /
Last active Oct 24, 2021
pre-run and post-run bash scripts for duplicati that manage a ramdisk based tempdir
# remove the ramdisk to free up the ram
diskutil eject $DUPLICATI__tempdir
mohakshah /
Created Apr 16, 2019
Patch for coreutils' b2sum that uses the sse implementation from BLAKE2/BLAKE2 for 20% faster checksumming.


Coreutils comes with the binary b2sum which can be used as a faster (and more secure) replacement of sha1sum/sha256sum utilities. The coreutils package uses the reference BLAKE2 implementations from the official repository. These reference implementation, while being portable, are not as fast the optimised implementations available from the same repository. My patch uses the sse versions which are "optimized for speed on CPUs supporting SSE2, SSSE3, SSE4.1, AVX, or XOP".

On an Intel Core i5 (4th Gen, 2 cores) machine running macOS, the b2sum binary built with this patch was about 20% faster than the default coreutils binary.

Patching and building

  • Download the latest coreutils tarball. This patch was successfully tested on version 8.31.
  • Apply the patch patch -p1 < ../coreutils-blake2-sse.patch.
  • build using the standard instructions. (./configure && make)

Keybase proof

I hereby claim:

  • I am mohakshah on github.
  • I am mohak ( on keybase.
  • I have a public key whose fingerprint is 9E91 105B 771E EC88 F682 8190 16FD 503E 8217 04A2

To claim this, I am signing this object:

mohakshah /
Last active Dec 14, 2021
Building ZFS on Raspberry Pi 3 running Rasbpian


This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.


  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
View net.duplicati.server.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
View Saavn.js
// Saavn.plist
// BeardedSpice
// Created by Yash Aggarwal on 1/6/15.
// Copyright (c) 2015 Tyler Rhodes / Jose Falcon. All rights reserved.
BSStrategy = {