- 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}
View nix-installer-unstable.md
View Creating a static copy of a dynamic website.md
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.
View nix-rg-hash
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 |
View prepare-commit-msg.sh
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" |
View gist:b120efa8015e96588f71ab1f893bd67d
People
![]() :bowtie: |
:smile: |
:laughing: |
---|---|---|
:blush: |
:smiley: |
:relaxed: |
:smirk: |
:heart_eyes: |
:kissing_heart: |
:kissing_closed_eyes: |
:flushed: |
:relieved: |
:satisfied: |
:grin: |
:wink: |
:stuck_out_tongue_winking_eye: |
:stuck_out_tongue_closed_eyes: |
:grinning: |
:kissing: |
:kissing_smiling_eyes: |
:stuck_out_tongue: |
View isc-dhcp.diff
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
diff --git a/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config b/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config | |
index aab6611..7f6b2fb 100755 | |
--- a/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config | |
+++ b/debian/initramfs-tools/lib/etc/dhcp/dhclient-enter-hooks.d/config | |
@@ -2,48 +2,56 @@ | |
case "$reason" in | |
BOUND) | |
- echo "DEVICE=$interface" >> /run/net-$interface.conf | |
- echo "PROTO=dhcp" >> /run/net-$interface.conf |
View hetzner-dropbear-network.patch
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/share/initramfs-tools/scripts/functions 2019-09-07 00:12:03.587701832 +0200 | |
--- /usr/share/initramfs-tools/scripts/functions 2019-09-07 00:13:00.793664387 +0200 | |
*************** | |
*** 632,637 **** | |
--- 632,640 ---- | |
> "${out_d}/$name.yaml" | |
done | |
rm -Rf "$tmpd" | |
+ # Hetzner patch | |
+ ip route add ${IPV4GATEWAY}/${IPV4NETMASK} dev ${DEVICE} |