Skip to content

Instantly share code, notes, and snippets.

@amno1
amno1 / aoc-helper.el
Last active December 4, 2023 23:56
Small utility to generate an empty skeleton file for solving AoC puzzles
;;; aoc-helper.el --- Gen AOC skeleton -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Arthur Miller
;; Author: Arthur Miller <arthur.miller@live.com>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@amno1
amno1 / org-capture-complete.el
Last active October 9, 2023 15:05
Two different ideas for org-capture via completing read
;;; org-capture-complete.el --- Two different ideas for org-capture via completing read -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Arthur Miller
;; Author: Arthur Miller <arthur.miller@live.com>
;; Keywords: tools, lisp
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@amno1
amno1 / shell-command-with-aliases.el
Last active November 4, 2023 19:09
Use Bash aliases in interactive shell-comands
;;; shell-command-with-aliases.el --- Use Bash aliases in interactive shell-comands -*- lexical-binding: t; -*-
;; Copyright (C) 2023 Arthur Miller
;; Author: Arthur Miller <arthur.miller@live.com>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@amno1
amno1 / Emacs-logo-ukr.svg
Last active January 13, 2023 13:04
Emacs Logo UKR
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amno1
amno1 / build-emacs.el
Last active December 8, 2023 04:59
Build Custom Emacs from Git from Emacs
;;; build-emacs.el --- Build custom Emacs from sources -*- lexical-binding: t; -*-
;; Copyright (C) 2022 Arthur Miller
;; Author: Arthur Miller <arthur.miller@live.com>
;; Keywords: tools
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@amno1
amno1 / Set up GitHub push with SSH keys.md
Created August 17, 2021 02:10 — forked from xirixiz/Set up GitHub push with SSH keys.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@amno1
amno1 / Toolbar.el
Created May 17, 2021 10:10 — forked from rougier/Toolbar.el
Emacs SVG Toolbar
;; An experiment for an SVG toolbar using icons from material.io
;;
;; Example usage: (toolbar 48 "black" "white" t t)
;; Material icons freely available (Apache 2 license) from
;; - https://material.io/resources/icons/?style=outline
;; - https://github.com/google/material-design-icons
(require 'xml) (require 'svg)
(defun toobar-item (label icon fg-color bg-color size with-icon with-label)
@amno1
amno1 / gist:b51897bb65e4d5fe8800e525c9536d1b
Created April 30, 2021 17:49
Programmatically add TODO labels in org-mode
(defun org-todo-per-file-keywords (kwds)
"Sets per file TODO labels. Takes as argument a list of strings to be used as
labels."
(let (alist)
(push "TODO" alist)
(dolist (kwd kwds)
(push kwd alist))
(setq alist (list (nreverse alist)))
;; TODO keywords.
(setq-local org-todo-kwd-alist nil)
@amno1
amno1 / open-with.el
Last active May 24, 2020 07:59
open-with.el hacked for my own taste ...
;;; openwith.el --- Open files with external programs -*- lexical-binding: t; -*-
;; <2020-04-10 fre> A. Miller
;; Hacked openwith to not be a minor mode.
;; The handler is now changed to be interactive function so it can be bound
;; to a key and invoked manually when desired instead of being a global handler.
;; Assumes invocation from a dired buffer, so the name is changed
;; to reflect the prefered use case.
;; Copyright (C) 2007 Markus Triska