Skip to content

Instantly share code, notes, and snippets.

View hypevhs's full-sized avatar

hypevhs

View GitHub Profile
@hypevhs
hypevhs / install-ripgrep-on-ubuntu.sh
Last active July 6, 2021 20:05 — forked from kostaz/install-ripgrep-on-ubuntu.sh
Install ripgrep on Ubuntu
#!/usr/bin/env bash
# Install ripgrep on Ubuntu
# Requires wget(1), curl(1), jq(1)
#
# I'm not responsible for any damages. Tested on WSL Ubuntu 18.04.4 LTS.
# List of changes from upstream:
# - use /usr/bin/env bash
# - set -e for zero error tolerance, and set -x for debugging
# - handle newer ripgrep release directory structure
@hypevhs
hypevhs / dfree
Last active February 3, 2022 07:51 — forked from sling00/dfree
dfree for samba that treats ZFS as a special case
#!/usr/bin/env bash
# vim: set et ts=2 sw=2:
# changes: run through shellcheck, fixing several bugs
set -euo pipefail
HERE="$(realpath "$1")"
if findmnt --noheadings --output FSTYPE --target "$HERE" | grep -Pq '^zfs$'; then
echo "dfree: $HERE is zfs" >&2