Skip to content

Instantly share code, notes, and snippets.

View drocco007's full-sized avatar

Daniel Rocco drocco007

  • BrightLink Technology
  • Atlanta, GA
View GitHub Profile
@drocco007
drocco007 / lsi
Created March 17, 2023 11:41
lsi: Tabular list of AWS EC2 instances (replaces awless ls instances)
#!/bin/bash -e
COLUMNS=8
SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
# https://github.com/jakobwesthoff/prettytable.sh
if [ ! -s "$SCRIPT_DIR/prettytable.sh" ] ; then
# execute in a subshell so wget’s output isn’t fed into the printed table
$(wget -O "$SCRIPT_DIR/prettytable.sh" https://github.com/jakobwesthoff/prettytable.sh/raw/master/prettytable.sh)
@drocco007
drocco007 / test_2159.log
Created May 2, 2021 02:06
test.log: GNU coreutils test.pl run against uutils test (uutils coreutils PR #2159)
1a...
1b...
N-1b...
P-1b...
NP-1b...
NNP-1b...
1c...
N-1c...
P-1c...
NP-1c...
numfmt 0.0.4
1...
2...
3...
4...
5...
5.1...
6...
7...
7a...
@drocco007
drocco007 / numfmttest
Last active February 22, 2021 02:49
Compare GNU numfmt to uutils/coreutils numfmt
#!/usr/bin/bash
PAD=10
TMPL="%${PAD}s %${PAD}s %${PAD}s %s\n"
SEP=$(printf "_%.0s" $(seq 1 $PAD))
# Format the values in a table for easy comparison
#
# $1 header label (SI or IEC)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
nope = false
yep = true
deep_true =
enabled: true
deep_false =
enabled: false
is_enabled = (obj) ->
if obj?.enabled?
import sys
from dragonfly import AppContext
class LinuxAppContext(AppContext):
"""Application context that uses host system application information.
AppContext subclass that compares its executable value against the running
application listed in the natlinkmain module's linux_module.

Hack for py.test to programmatically add doctests from an explicitly specified module (as opposed to a package or glob pattern specified on the command line).

Define a conftest.py which instructs py.test to collect the doctests from a specific module when the conftest.py file itself is collected.

@drocco007
drocco007 / git_jira.ipynb
Last active April 16, 2016 08:21
Using Jupyter and the bash kernel to explore extracting JIRA issues from git
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.