This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # A local watch multitool | |
| # | |
| import base64 | |
| import glob | |
| import hashlib | |
| import itertools as it | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # IPython: | |
| # %run -n putil.py | |
| # | |
| import itertools as it | |
| import functools as ft | |
| import math as mt | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def p(old, new): return '%+.1f%%' % (100*((new-old)/old)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # some flags: | |
| # -k - run in watch mode | |
| # -d - show diff | |
| # -c - cat (don't buffer) | |
| set -eu -o pipefail | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # | |
| # Filter/count/find culprits for emails in .mbox format | |
| # | |
| # To find number of emails from an address: | |
| # ./mboxfilter.py mail-2022.mbox --from=@github.com | |
| # | |
| # To separate these out into their own .mbox: | |
| # ./mboxfilter.py mail-2022.mbox --from=@github.com -omail-github-2022.mbox | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -uo pipefail | |
| SRC=(lfs.c lfs_util.c) | |
| HDR=(${SRC[@]/%.c/.h}) | |
| export CC='arm-none-eabi-gcc -mthumb' | |
| export CFLAGS='-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR' | |
| export BUILDDIR=watch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # example: | |
| # ./tmux-fixh.sh -g top-right 7 | |
| if [ "$#" -lt 2 ] && [ "$1" != "-u" ] | |
| then | |
| echo "usage: $0 [-gu] <pane> <height>" | |
| exit 1 | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Runs the given markdown file as a bash script, with any failing commands | |
| # resulting in an error | |
| # | |
| set -euo pipefail | |
| if [ "$#" -lt 1 ] | |
| then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import subprocess | |
| import os | |
| import re | |
| import collections | |
| import itertools | |
| import csv | |
| import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir newlib-pico | |
| PREFIX=$(pwd)/newlib-pico | |
| cd newlib-pico | |
| echo "Created $(pwd)" | |
| git clone git://sourceware.org/git/newlib-cygwin.git newlib-source | |
| cd newlib-source | |
| echo "Created $(pwd)" |
NewerOlder