Skip to content

Instantly share code, notes, and snippets.

View xmailla's full-sized avatar

Xavier Maillard xmailla

View GitHub Profile
@xmailla
xmailla / keybindings.json
Created August 4, 2022 04:44 — forked from kevinslin/keybindings.json
kevin.daily-journal-template
// Place your key bindings in this file to override the defaults
[
// The following are Kevin's keybindings for VSCode
// They are made available under CC BY 4.0
//
// To navigate
// `==` denote sections
// `---` denotes subsections
//
// == Dendron
@xmailla
xmailla / nano.el
Created February 6, 2025 05:14 — forked from rougier/nano.el
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <[email protected]>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]
@xmailla
xmailla / elfeed-config.el
Created February 19, 2025 04:24 — forked from alphapapa/elfeed-config.el
Elfeed config
;;; elfeed configuration
(use-package elfeed
;;;; Keymaps
:general
(:keymaps '(shr-map)
"a" 'pocket-reader-shr-add-link)
(:keymaps '(elfeed-show-mode-map elfeed-search-mode-map)
@xmailla
xmailla / fitness.org
Created February 19, 2025 04:32 — forked from alphapapa/fitness.org
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

(cl-defun ap/feed-for-url (url &key (prefer 'atom) (all nil))
"Return RSS/ATOM feed URLs for web page at URL."
(cl-flet ((add-protocol (protocol url)
(unless (s-starts-with? protocol url)
(setq url (if (s-starts-with? "//" url)
(concat protocol ":" url)
(concat protocol "://" url))))
url))
(let* ((protocol (second (s-match (rx (group "http" (optional "s")) "://")
url)))