Skip to content

Instantly share code, notes, and snippets.

View ProBackup-nl's full-sized avatar
🏠
Working from home

C. Jacobs ProBackup-nl

🏠
Working from home
View GitHub Profile
@the-mikedavis
the-mikedavis / README.md
Last active November 6, 2023 02:12
`ddrescue` a directory

ddrfind - ddrescue on a directory

A non-recursive approach to using ddrescue on a directory.

Chances are, if you have a currupted set of memory, it's not just a few files. It's probably a whole disk. Wanna save it? You can use ddrescue, but that doesn't work on directories, only files. If you want to use it on a whole big directory, you'll need to do each file one by one. That's exactly what this script does.

Installation

@mgoellnitz
mgoellnitz / gist.sh
Last active December 7, 2022 14:37
Gist Command Line Tool for Single File Gists
#!/bin/bash
#
# Copyright 2016-2021 Martin Goellnitz
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@jhurliman
jhurliman / getopts.sh
Created August 25, 2015 22:44
Parse command line options in pure bash
# Parse command line arguments
while [[ $# > 1 ]]; do
local key="$1"
case $key in
-g|--github-token)
GITHUB_TOKEN="$2"
shift
;;
# Catch-all
*)