Skip to content

Instantly share code, notes, and snippets.

View ConradMearns's full-sized avatar
🐚
well shello there

Conrad Mearns ConradMearns

🐚
well shello there
View GitHub Profile
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")
# 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 {
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";
{ 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!
{ 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" ];
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: