News for hackers. Stuff that matters.
Re:Obsidian – A knowledge base from a local folder of plain ... by bloopernova on Sunday October 17, 2021 @04:19PM (#28899431)
And some more snippets since I'm copying and pasting already. (I'm using "bat" to view files. Get it from https://github.com/sharkdp/bat )

  40   │ ;; Taken from https://karl-voit.at/2017/02/11/my-system-is-foobar/
  53   │ ;; Check if system is GNU/Linux
  54   │ (defun my-system-type-is-gnu ()
  55   │   "Return non-nil if system is GNU/Linux-based."
  56   │   (string-equal system-type "gnu/linux")
  57   │   )
  59   │ ;; make Linux a bit more mac-like
  60   │ (when (my-system-type-is-gnu)
  61   │   (global-set-key (kbd "s-/") 'comment-or-uncomment-region-or-line)
  62   │   (global-set-key (kbd "s-<backspace>") '(lambda () (interactive) (kill-line 0)))
  64   │   )


 362   │ (defun newer-than-7-days(file)
 363   │   "Return list of files newer than 7 days old in directory FILE."
 364   │   (> 7
 365   │     (/(float-time(time-subtract
 366   │                    (current-time)
 367   │                    (nth 5 (file-attributes file))))
 368   │       86400)))
 407   │   (setq org-agenda-files
 408   │     (seq-filter #'newer-than-7-days
 409   │       (directory-files-recursively "~/Org/Journal" "\\.org$")))
Yes, Emacs is an operating system that also edits text :)

There are no comments on this comment yet.