Skip to content

Instantly share code, notes, and snippets.

@krisbalintona
krisbalintona / pdf-tools-modify-metadata.el
Last active November 13, 2024 04:06
Code snippet from my Emacs config. Only tested on Linux; requires the pdftk binary. To use, call `krisb-pdf-tools-metadata-modify` interactively a pdf-view buffer, or invoke it non-interactively with a single argument that is the pdf file path.
;;; -*- lexical-binding: t -*-
;; UPDATE 2024-11-12: I am currently in development of pdf-meta-edit.el
;; (https://github.com/krisbalintona/pdf-meta-edit) which is meant to be a
;; featureful package that covers the use-case below and more.
;;; Modify PDF metadata
;; Emacs wrapper and convenience functions for changing package metadata using
;; pdftk. Only tested on Linux; requires the pdftk binary. See
;; https://unix.stackexchange.com/a/72457 for more information on the CLI
@tazjin
tazjin / yants.md
Last active June 15, 2023 22:32
Yet Another Nix Type System (aka YANTS)

yants

Note: Yants now has its own repository.


This is a tiny type-checker for data in Nix, written in Nix.

Features:

@yorickvP
yorickvP / acme-sh.nix
Last active September 12, 2019 12:17
acme.sh nix module, written at Serokell
{ config, lib, pkgs, ... }:
let
cfg = config.services.acme-sh;
dnstype = lib.types.enum [ "dns_aws" "dns_dnsimple" ];
submod = with lib; {
domains = mkOption {
type = types.coercedTo (types.listOf types.string)
(f: lib.genAttrs f (x: cfg.dns)) (types.attrsOf dnstype);
default = { "${cfg.mainDomain}" = cfg.dns; };