Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
jaytaylor / .psqlrc
Created January 6, 2015 17:37
My .psqlrc file.
-- Found at:
-- http://www.if-not-true-then-false.com/2009/postgresql-psql-psqlrc-tips-and-tricks/
-- http://opensourcedbms.com/dbms/psqlrc-psql-startup-file-for-postgres/
\set QUIET ON
\pset pager always
\pset null 'NULL'
@jaytaylor
jaytaylor / math.sh
Created August 8, 2019 21:33
Math functions from python as bash "builtins".
#!/usr/bin/env bash
##
#
# @author Jay E. Taylor <jay@jaytaylor.com>
#
# @description Math functions for bash!
#
##
@jaytaylor
jaytaylor / git-stats-overview.sh
Last active December 19, 2025 18:38
Git repository statistics: Get # of commits and lines changed since some previous point in time
#!/usr/bin/env bash
set -e
##
# @author Jay Taylor [@jtaylor]
#
# @date 2014-06-28
#
# @description Git repository statistics: Get # of commits and lines changed since some previous point in time.
#
@jaytaylor
jaytaylor / ._python_programming_snippets.md
Last active December 19, 2025 18:34
Jay's Python programming skeleton snippets quick reference
@jaytaylor
jaytaylor / ._bash_shell_programming_snippets.md
Last active December 19, 2025 18:33
jaytaylor's Bash shell skeleton programming snippets quick reference

Bash shell skeleton programming snippets

Quick references to common and useful bash programming snippets and boilerplate.

@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active September 11, 2025 15:46
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@jaytaylor
jaytaylor / ai-coding-tools-2025-summer-edition-by-claude.md
Last active September 10, 2025 09:35
AI Coding Tools: 2025 Summer Edition

AI CLI Coding Tools: A Developer's Guide

The landscape of AI-powered command-line coding assistants has exploded recently, each taking a different philosophical approach to the same fundamental problem: how do we make writing code less tedious without sacrificing control? Here's a breakdown of four notable players worth your attention.

The Contenders

@jaytaylor
jaytaylor / cf.sh
Last active September 10, 2025 09:34
CloudFlare command-line DNS management shell script, now with CloudFlare v4 API support!
#!/usr/bin/env bash
##
# @author Jay Taylor [@jtaylor]
# @date 2013-08-15
#
# @description CloudFlare management script.
#
# Path ENV VAR override.
@jaytaylor
jaytaylor / timeout.sh
Created September 11, 2013 18:18
Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements.
#
# Mac OS-X does not come with the delightfully useful `timeout` program. Thankfully a rough BASH equivalent can be achieved with only 2 perl statements.
#
# Originally found on SO: http://stackoverflow.com/questions/601543/command-line-command-to-auto-kill-a-command-after-a-certain-amount-of-time
#
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
## Example usage:
#
@jaytaylor
jaytaylor / gitmodules-sorter.md
Created May 4, 2017 17:41
Sort .gitmodules, also easily adaptable to sort files in blocks (e.g. 4 lines at a time, or arbitrary region at a time).