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 glob | |
from pathlib import Path | |
files = glob.glob(".\\**\*.md", recursive=True) | |
for f in files: | |
s = Path(f).stem | |
if s not in open('Index.md').read(): | |
print(f, "not in Index") |
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
# 1.65 -> 1.81 https://www.reddit.com/r/NixOS/comments/flwrlh/seaweedfs/ | |
# thanks u/kvtb | |
with import <nixpkgs> {}; | |
buildGoModule rec { | |
pname = "seaweedfs"; | |
version = "1.81"; | |
src = fetchFromGitHub { |
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
let | |
mkSystem = cfg: system: | |
let | |
# Pin the deployment package-set to a specific version of nixpkgs | |
pkgs = import (builtins.fetchGit { | |
name = "nixos-unstable-2020-05-18"; | |
url = "https://github.com/nixos/nixpkgs-channels/"; | |
ref = "refs/heads/nixpkgs-unstable"; | |
rev = "62e866e4fd6e414c469f365e1c9b3fb0c80b8e8d"; |
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
{ config, lib, pkgs, ... }: | |
{ | |
imports = [ | |
./hardware-pi-4.nix | |
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix> | |
]; | |
networking.hostName = "neri"; | |
environment.systemPackages = with pkgs; [ | |
sl # toot toot! |
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
{ config, pkgs, ... }: { | |
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/sd-image-raspberrypi4.nix> ]; | |
# SSH Settings | |
services.openssh.enable = true; | |
services.openssh.passwordAuthentication = false; | |
services.openssh.permitRootLogin = "yes"; | |
services.openssh.challengeResponseAuthentication = false; | |
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ]; | |
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 os | |
# Get list of files to rename | |
files = os.listdir('.') | |
files = filter(lambda x: x.endswith('pdf'), files) | |
import pdftotext | |
for f in files: | |
fdat = "" | |
with open(f, 'rb') as pf: |