Skip to content

Instantly share code, notes, and snippets.

msteen

Block or report user

Report or block msteen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@msteen
msteen / find_zettel_orphans.rb
Last active Apr 29, 2020 — forked from DivineDominion/find_zettel_orphans.rb
In a directory of Zettel notes, find all those without incoming links
View find_zettel_orphans.rb
#!/usr/bin/env ruby
require 'set'
# Change the path here:
# ARCHIVE = '~/Archive/'
ARCHIVE = '/admin/fork/The-Archive-Demo-Notes'
EXTENSIONS = %w{.md .txt .markdown .mdown .text}
#################################################################
View limits.nix
{ # Limits
# We increase to inotify limits since the defaults are easily exceeded.
boot.kernel.sysctl = {
"fs.inotify.max_user_instances" = 4096;
"fs.inotify.max_user_watches" = 524288;
};
# Be very generous with resource restrictions.
# Should be lower than the value defined in /proc/sys/fs/file-max.
# The domain * excludes root, so we need repeat it for root.
@msteen
msteen / default.nix
Created Mar 22, 2020
NodeJS outside of Nix within NixOS
View default.nix
{
environment.systemPackages = with pkgs; [ nodejs-12_x ];
environment.shellInit = ''
# Workaround for not being able to install packages globally.
export PATH="/opt/npm/bin:$PATH"
'';
}
View grub-secrets.nix
{ config, lib, ... }:
with lib;
{
# Add support for Grub secrets
config = mkIf (config.boot.loader.grub.enable && config.boot.initrd.secrets != {}) {
boot.loader = {
supportsInitrdSecrets = mkForce true;
grub.extraInitrd = "/boot/grub/secrets-initrd.gz";
You can’t perform that action at this time.