Skip to content

Instantly share code, notes, and snippets.

View brianclements's full-sized avatar

Brian Clements brianclements

View GitHub Profile
@brianclements
brianclements / Config.in
Last active November 28, 2023 04:46
cURL package information for addition in buildroot. Copy both files to /package/curl and don't forget to add 'source "package/curl/Config.in"' to your top level Config.in
config BR2_PACKAGE_LIBCURL
bool "libcurl"
help
cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet,
and Dict servers, using any of the supported protocols.
http://curl.haxx.nu/
config BR2_PACKAGE_CURL
bool "curl binary"
@brianclements
brianclements / Config.in
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)
config BR2_PACKAGE_GIT
bool "git"
depends on BR2_LARGEFILE
depends on BR2_USE_MMU # uses fork()
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
help
Git is a free and open source distributed version control system
designed to handle everything from small to very large projects.
@brianclements
brianclements / dkcleanup.sh
Last active November 13, 2023 10:49
Bash script helper to remove Docker images and containers.
#!/bin/bash
# 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}
  • Update HISTORY.rst
  • Update version number in my_project/__init__.py
  • Update version number in setup.py
  • Install the package again for local development, but with the new version number:
python setup.py develop
  • Run the tests:
python setup.py test
@brianclements
brianclements / Commit Formatting.md
Last active April 19, 2024 09:38
Angular Commit Format Reference Sheet

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.

@brianclements
brianclements / docops.rst
Last active August 29, 2015 14:12
Docopt Reference Documents

Help message format

Help message consists of 2 parts:

  • Usage pattern, e.g.:

    Usage: my_program.py [-hso FILE] [--quiet | --verbose] [INPUT ...]
  • Option descriptions, e.g.:
@brianclements
brianclements / Changelog Formatting.md
Created June 22, 2015 16:32
Changelog Formatting Reference
@brianclements
brianclements / boxes.rkt
Created March 13, 2016 08:11
understanding boxes and pass-by-value in racket
#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
brianclements / recursive-curry.rkt
Created March 14, 2016 01:05
Infinite currying using tail-recursion in Racket
#lang racket
(define (rec-curry-add [inc 0] [sum 0])
(if (equal? inc 0)
sum
(begin
(set! sum (+ sum inc))
(lambda ([inc 0])
(rec-curry-add inc sum)))))
@brianclements
brianclements / Bash Script.sh
Last active November 13, 2023 10:48
Quick and Dirty Bash Script Template
#!/bin/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
##----------------