Skip to content

Instantly share code, notes, and snippets.

View mohakshah's full-sized avatar

Mohak Shah mohakshah

  • Ahmedabad, India
View GitHub Profile
//
// Saavn.plist
// BeardedSpice
//
// Created by Yash Aggarwal on 1/6/15.
// Copyright (c) 2015 Tyler Rhodes / Jose Falcon. All rights reserved.
//
BSStrategy = {
version:2,
displayName:"Saavn",
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.duplicati.server</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Duplicati.app/Contents/MacOS/duplicati-server</string>
<string>--webservice-port=8200</string>
@mohakshah
mohakshah / Instructions.md
Last active July 15, 2023 04:58
Building ZFS on Raspberry Pi 3 running Rasbpian

Introduction

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.

Steps

  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

Keybase proof

I hereby claim:

  • I am mohakshah on github.
  • I am mohak (https://keybase.io/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
mohakshah / Instructions.md
Created April 16, 2019 11:52
Patch for coreutils' b2sum that uses the sse implementation from BLAKE2/BLAKE2 for 20% faster checksumming.

Introduction

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)
@mohakshah
mohakshah / duplicati-ramdisk-post.sh
Last active October 24, 2021 04:01
pre-run and post-run bash scripts for duplicati that manage a ramdisk based tempdir
#!/bin/bash
# remove the ramdisk to free up the ram
diskutil eject $DUPLICATI__tempdir