This file contains 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 -eu -o pipefail | |
# run in watch mode? | |
if [[ "$@" == *-w* ]] | |
then | |
./scripts/watch.py \ | |
$([[ "$@" == *-z* ]] && echo -z || echo -n4) \ |
This file contains 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 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 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 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 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 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)" |
This file contains 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
alias mark='printf "\e[3$((1+RANDOM%5))m%$(tput cols)s\e[0m" | tr " " "="' |
This file contains 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
#include "lfs.h" | |
#include "emubd/lfs_emubd.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// test stuff | |
static void test_log(const char *s, uintmax_t v) { | |
printf("%s: %jd\n", s, v); |
This file contains 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
#include "lfs.h" | |
#include "emubd/lfs_emubd.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// test stuff | |
static void test_log(const char *s, uintmax_t v) { | |
printf("%s: %jd\n", s, v); |
NewerOlder