I hereby claim:
- I am mkasberg on github.
- I am mkasberg (https://keybase.io/mkasberg) on keybase.
- I have a public key ASApuEY9bNVN-3fR7rfBoOwjBdVVJpPd9SmtCxCAst4gHQo
To claim this, I am signing this object:
| #!/usr/bin/env php | |
| <?php | |
| print "CSV 2 JSON\n"; | |
| if (!isset($argv[2])) { | |
| print "Usage: csv2json.php infile.csv outfile.json\n"; | |
| exit(); | |
| } |
| <?php | |
| class CustomLogger { | |
| public function __construct() { | |
| // Try commenting out this line: | |
| set_error_handler(array($this, 'handleError')); | |
| } | |
| public function __desctruct() { | |
| restore_error_handler(); |
| #!/usr/bin/env python | |
| import json | |
| import os | |
| from subprocess import check_call, check_output, STDOUT | |
| import sys | |
| if len(sys.argv) != 3: | |
| print "Usage: %s input.wav output.wav" % __file__ | |
| sys.exit(1) |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # A simple script to make backups with rsync easy! | |
| # This will backup the entire home dir of the current user. | |
| # (I always forget these commands.) | |
| function print_usage { | |
| cat << EOF | |
| Usage: $0 [options] |
| #!/usr/bin/env ruby | |
| require 'time' | |
| usage = """ | |
| Usage: date_shift.rb SECONDS FILE | |
| Look for dates like 2020-06-01T12:26:41Z in FILE | |
| and shift all of them by SECONDS. Print the result to | |
| STDOUT. |
| #!/usr/bin/env bash | |
| # Keep this script in a directory with the master copy of your dotfiles. | |
| # For example, keep this script in a dotfiles folder in your Dropbox. | |
| # Run this script to diff your dotfiles between the master copy (in the pwd) | |
| # and the dotfiles installed at ~. | |
| show_help() { | |
| cat <<EOF | |
| Usage: diff-dotfiles.sh OPTION [filename] |
| .PHONY: help image test shell clean | |
| DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |
| help: | |
| @echo "Usage: make [target]" | |
| @echo "" | |
| @echo "Targets:" | |
| @echo " help Print this help message." | |
| @echo " image Build the my-project:latest Docker image." | |
| @echo " shell Open a shell inside the Docker container." |
| #!/usr/bin/env ruby | |
| require 'optparse' | |
| require 'json' | |
| metadata = {} | |
| TARGET_I = "-16" | |
| TARGET_TP = "-1.5" | |
| TARGET_LRA = "11" | |
| SAMPLE_RATE = "44100" | |
| BITRATE = "128k" |
| #!/usr/bin/env ruby | |
| # Define the "commit message ratio" as (commit_body_words / commit_lines_changed). | |
| # | |
| # With no args, this script will find the commit message ratio of all commits in | |
| # the git repo in the pwd, and will sort them by that ratio. | |
| # (Commits with a high commit message ratio tend to be interesting commits!) | |
| # | |
| # With a commit hash as the only arg, provide the commit message ratio of that commit. | |
| # |