- 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
[color "blame"] | |
highlightRecent = 234, 23 month ago, 235, 22 month ago, 236, 21 month ago, 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226 | |
[blame] | |
coloring = highlightRecent | |
date = human |
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" |
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
let cross = self: super: { | |
# https://github.com/NixOS/nixpkgs/pull/113225 | |
buildLinux = attrs: self.callPackage "${self.fetchFromGitHub { | |
owner = "mroi"; | |
repo = "nixpkgs"; | |
rev = "patch-linux"; | |
sha256 = "07i6wwf4vh5ahnkp3wvyzdiaqhrxakjjxbdrlwdviis777p9gl5v"; | |
}}/pkgs/os-specific/linux/kernel/generic.nix" attrs; |
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
---------------------- | |
-- #example ytdl_preload.conf | |
-- # make sure lines do not have trailing whitespace | |
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace | |
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider | |
-- #temp=R:\ytdltest | |
-- #ytdl_opt1=-r 50k | |
-- #ytdl_opt2=-N 5 | |
-- #ytdl_opt#=etc |
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
import json | |
import glob | |
all_bookmarks = [] | |
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one | |
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder | |
for file_name in files: | |
print(file_name) | |
with open(file_name) as bk: |
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
func completionCmd(cliName string) *cobra.Command { | |
return &cobra.Command{ | |
Use: "completion [bash|fish|oh-my-zsh|powershell|zsh]", | |
Short: "Generates shell completions", | |
Args: cobra.ExactValidArgs(1), | |
ValidArgs: []string{"bash", "fish", "oh-my-zsh", "zsh", "powershell"}, | |
DisableFlagsInUseLine: true, | |
Long: fmt.Sprintf(` | |
Outputs shell completion for the given shell (bash, fish, oh-my-zsh, or zsh) | |
OS X: |
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
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
let | |
floatingIPv4 = "95.216.183.106"; | |
floatingIPv6 = "2a01:4f9:c01f:65::1"; | |
in | |
{ |
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 | |
""" | |
Android11 | |
Pair and connect devices for wireless debug on terminal | |
python-zeroconf: A pure python implementation of multicast DNS service discovery | |
https://github.com/jstasiak/python-zeroconf | |
""" |