- List disks and determine the disk
$ diskutil list - Unmount the disk
$ diskutil unmountDisk disk4 - Install
e2fsprogs
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 -euo pipefail | |
| ARCHIVE="${1:?Usage: $0 <Git commit title dd.mm.yyyy Author name.zip> <target_dir>}" | |
| TARGET_DIR="${2:?Usage: $0 <Git commit title dd.mm.yyyy Author name.zip> <target_dir>}" | |
| if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
| echo "Error: $TARGET_DIR is not a git repository (or any parent directory)." | |
| 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
| import argparse | |
| import hashlib | |
| import json | |
| import subprocess | |
| import sys | |
| from collections import Counter | |
| from functools import partial | |
| from multiprocessing import Pool | |
| from pathlib import Path | |
| from time import time |
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
| .DEFAULT_GOAL:=build/main.pdf | |
| .PHONY: clean | |
| clean: | |
| git clean -xf *converted-to.pdf *.blg *.log *.aux build/*.bib build/*.pdf | |
| .PHONY: compress | |
| compress: | |
| mkdir -p build | |
| git ls-files | zip -@ build/manuscript-$(shell date +%d%b).zip -x "Makefile" |
git worktree add
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
| import unittest | |
| from collections import namedtuple | |
| class TestToyExample(unittest.TestCase): | |
| def setUp(self): | |
| User = namedtuple('User', ['name', 'age', 'sex']) |
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 TTL to 65 on macOS | |
| sudo sysctl -w net.inet.ip.ttl=65 |
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 | |
| for i in {1..30} | |
| do | |
| # sudo dscacheutil -flushcache | |
| sudo killall -HUP mDNSResponder | |
| done | |
| echo "DNS cache flushed!" |