- systemctl disable --now nix-daemon.service nix-daemon.socket
- nix-env -p /nix/var/nix/profiles/default/ --install nix-2.4pre20210317_8a5203d
- rm /etc/profile.d/nix.sh /etc/profile.d/nix-daemon.sh
- ln -s /nix/var/nix/profiles/default/etc/profile.d/nix.sh /etc/profile.d/nix.sh
- ln -s /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh /etc/profile.d/nix-daemon.sh
- systemctl link /nix/var/nix/profiles/default/lib/systemd/system/nix-daemon.{service,socket}
The command line, in short…
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/
…and the options explained
- -k : convert links to relative
- -K : keep an original versions of files without the conversions made by wget
- -E : rename html files to .html (if they don’t already have an htm(l) extension)
- -r : recursive… of course we want to make a recursive copy
- -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
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 nix-shell | |
#!nix-shell -i bash -p ripgrep | |
#!/usr/bin/env bash | |
# vim: set filetype=bash: | |
set -eou pipefail | |
if [[ $# != 1 ]]; then | |
echo "Usage: $0 038342z429cavdp2q3mjczlprw83nca030mjlipjppr43bzg9db0" | |
exit 0 |
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 bash | |
# shellcheck disable=SC2034 | |
COMMIT_MSG_FILE=$1 # file which contains the commmit message | |
# shellcheck disable=SC2034 | |
COMMIT_SOURCE=$2 # eg commit | |
# shellcheck disable=SC2034 | |
SHA1=$3 # eg head | |
perl -i -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" |