Skip to content

Instantly share code, notes, and snippets.

Brent Sanders pdkl95

Block or report user

Report or block pdkl95

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pdkl95
pdkl95 / trap_cleanup_demo.sh
Created Jul 7, 2019
Using the "trap" shell builtin to cleanup a tempfile safely duiring errors.
View trap_cleanup_demo.sh
#!/bin/bash
#####################################################
# An example of using a trap to cleanup a temporary #
# even during errors or early script exit. #
#####################################################
# an easy way to observe the tempfile:
# watch "command ls -l -tc --reverse /tmp | tail"
@pdkl95
pdkl95 / ytdltracks.sh
Created May 27, 2019
GUI track selector front end for youtube-dl
View ytdltracks.sh
#!/bin/bash
#
# ytdltracks - GUI track selector front end for youtube-dl
#
# Author: pdkl95 (2819)
#
# Requires: https://github.com/v1cont/yad
#
View whistleblower_prayer.txt
(To the whistleblowers,
in hope that they stay alive.)
Thanks for systemic corruption
and disregard for the rule of law.
Thanks for the transparent lies and
carefully framed talking points.
Thanks for the profitable arms sales
View getopt_example.sh
#!/bin/sh
VERSION="1.0"
AUTHOR="John Doe"
COPYRIGHT_YEAR="2000"
SCRIPT_NAME="getopt_example"
# or maybe SCRIPT_NAME="$(basename "$0")"
show_usage() {
@pdkl95
pdkl95 / bash_only_mergesort.bash
Last active Feb 2, 2018
Useless Pure-Bash MergeSort
View bash_only_mergesort.bash
#!/bin/bash
#############################################################################
## ##
## bash_only_mergesort.bash -- mergesort written in pure bash ##
## ##
## Why: I have no idea. This isn't going to ever be useful. ##
## Sanity: Do not use this. Ever. Just use sort(1) ##
## Author: pdkl95@thoughtnoise.net ##
## Homepage: https://gist.github.com/pdkl95 ##
@pdkl95
pdkl95 / mident.bash
Created Oct 10, 2012
mident - a wrapper for a more reliable "mplayer -identify"
View mident.bash
#!/bin/bash
#####################################################
###/ \### #
### mident ### This is a wrapper script around #
###\ /### the "-identify" feature provided #
################ by mplayer/mplayer2, similar to #
# the "mplayer.sh" script that is #
# distributed with mplayer itself. This version #
# should be significantly more reliable, easier #
@pdkl95
pdkl95 / at-scrape.rb
Created Aug 17, 2012
AUTO-DERP (with dadadodo)
View at-scrape.rb
#!/bin/env ruby
# encoding: utf-8
#
# *** [WARNING]
# *** Be aware that I have not added any throttling, respect
# *** of robots.txt, or anything else to limit this script!
# *** If it gets you banninated, or something due to obvious
# *** bot-like behavior, that's your responsibility!
# *** [/warning]
#
View Fark Theme Unfucker (v2.1).css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("fark.com"), domain("totalfark.com"), domain("foobies.com") {
/*
* +-->>> FARK THEME UNFUCKER <<<--+
* | "sleep? what sleep?!" edition |
*
*
* ==UserStyle==
* @name PDKL95's common util library
@pdkl95
pdkl95 / mcjar-aether.bash
Created Jan 18, 2012
MC AetherMod .jar Patch Script
View mcjar-aether.bash
#!/bin/bash
## This script is Copyright Brent Sanders 2012, and is released
## for general use under the GPLv3
##
## INSTRUCTIONS:
## Put this script and all the downloaded .zip files for the various
## mods in a folder. 'cd' over to that folder. Run this script.
##
## e.g.
@pdkl95
pdkl95 / rubygems-completion.bash
Created Dec 15, 2011
bash tab completion for gem
View rubygems-completion.bash
#!/bin/bash
# -*- mode: bash -*-
#
# ---------------------------
# --= bash completion for the =--
# --= rubygems "gem" program =--
# ---------------------------
#
# Copyright C 2011 Brent Sanders <git@thoughtnoise.net>
# -> Derived losely from "git-completion.sh" in the git-sh
You can’t perform that action at this time.