Skip to content

Instantly share code, notes, and snippets.


Brian Clements brianclements

View GitHub Profile
brianclements / Bash
Last active May 26, 2023 07:07
Quick and Dirty Bash Script Template
View Bash
export _script_name=$(basename -a "$0")
export _script_short_desc="
A script for doing things."
export _script_mod_date='0000.00.00-00:00'
export _script_version='0.0.1'
export _script_requirements='none'
export _script_bash_debug=false
brianclements / recursive-curry.rkt
Created March 14, 2016 01:05
Infinite currying using tail-recursion in Racket
View recursive-curry.rkt
#lang racket
(define (rec-curry-add [inc 0] [sum 0])
(if (equal? inc 0)
(set! sum (+ sum inc))
(lambda ([inc 0])
(rec-curry-add inc sum)))))
brianclements / boxes.rkt
Created March 13, 2016 08:11
understanding boxes and pass-by-value in racket
View boxes.rkt
#lang racket
(define a 'one)
(printf "var 'a' is '~a'\n\n" a)
(define (foo x)
(printf "we call '(foo)' here and pass it '2'\n")
(printf "(foo) sets 'x'\n")
(printf "->arg 'x' is '~a'\n" x)
brianclements / Changelog
Created June 22, 2015 16:32
Changelog Formatting Reference
View Changelog
brianclements / docops.rst
Last active August 29, 2015 14:12
Docopt Reference Documents
View docops.rst

Help message format

Help message consists of 2 parts:

  • Usage pattern, e.g.:

    Usage: [-hso FILE] [--quiet | --verbose] [INPUT ...]
  • Option descriptions, e.g.:

brianclements / Commit
Last active May 31, 2023 07:10
Angular Commit Format Reference Sheet
View Commit

Commit Message Format

This specification is inspired by and supersedes the [AngularJS commit message format][commit-message-format].

We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.

Each commit message consists of a header, a body, and a footer.

  • Update HISTORY.rst
  • Update version number in my_project/
  • Update version number in
  • Install the package again for local development, but with the new version number:
python develop
  • Run the tests:
python test
brianclements /
Last active December 27, 2022 22:50
Bash script helper to remove Docker images and containers.
# options:
# remove stopped containers and untagged images
# $ dkcleanup
# remove all stopped|running containers and untagged images
# $ dkcleanup --reset
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag}
# pattern and untagged images
# $ dkcleanup --purge {image}
brianclements /
Created May 2, 2014 06:34
git 1.9.0 package information for addition in buildroot. Copy both files to /package/git, replacing the originals (which are v1.8.5.3)
bool "git"
depends on BR2_LARGEFILE
depends on BR2_USE_MMU # uses fork()
Git is a free and open source distributed version control system
designed to handle everything from small to very large projects.
brianclements /
Last active November 21, 2020 17:00
cURL package information for addition in buildroot. Copy both files to /package/curl and don't forget to add 'source "package/curl/"' to your top level
bool "libcurl"
cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet,
and Dict servers, using any of the supported protocols.
bool "curl binary"