Skip to content

Instantly share code, notes, and snippets.

@RyanGreenup
RyanGreenup / NotableCustomCss.md
Last active February 7, 2022 16:17
Implementing Custom and Persistent CSS for Notable

Custom CSS in Notable

Tue 21 Jan 2020 08:20:34 PM

Custom CSS can be used in Notable by using the ! important specification in the CSS.

First download and extract the .AppImage with: [^1]

wget https://github.com/notable/notable/releases/download/v1.8.3/Notable-1.8.3.AppImage
chmod +x ./Notable-1.8.3.AppImage
@RyanGreenup
RyanGreenup / EmacsEmail.org
Created May 3, 2020 01:29
Export Email from Emacs with Formatting

Export Email from Emacs

How to export email from Emacs:

Define a function to export email:

(defun export-email ()
  (interactive)
  (message "Beginning Email Export")
  (yank-visible-org-buffer)
  (call-eml)
@RyanGreenup
RyanGreenup / Fix-MD-Links-Script.sh
Last active June 20, 2020 05:09
Fix Markdown Links if they have a unique name
@RyanGreenup
RyanGreenup / test.org
Created June 23, 2020 00:10
Example of Markup

Browsing Yaml Tags

In order to browse YAML tags just search for the verbatim structure with ripgrep, in this context YAML tags are only used to set up notebook directories, so they will always be nested with / characters, hence the number of false positives will be small enough to justify this simplicity:

  cat 00tags.csv  | rg '[a-zA-Z0-9]+/[a-zA-Z0-9/]+'  | fzf | xargs rg -l > /tmp/kdkdjaksd;
  cat /tmp/kdkdjaksd
# I couldn't get a pipe to work so I had to save to /tmp

Using TikZ in Markup Languages

Introduction

So consider the tikz code at listing tikz-eg1 and figure Tikz-out1:

@RyanGreenup
RyanGreenup / agenda-bindings.org
Created August 30, 2020 04:23
Org Agenda Bindings

Org Agenda Bindings

C-k
org-agenda-kill
C-n
org-agenda-next-line

Editing Math With Texmacs

To edit the contents of the clipboard with TeXMacs:

  1. Save the clipboard to a temp .tex file
  2. Open the .tex file with TeXmacs a. TeXmacs will automatically import it on the fly
  3. From TeXmacs use the GUI to edit the math
  4. Save TeXmacs and it will export the file on the fly
  5. Run the file through pandoc to strip off all the header arguments
  6. Put the file back into the clipboard
(defun my-insert-clipboard-png ()
(interactive)
(let
;; Read Filename from Minibuffer
((filename (read-from-minibuffer "image file name: "))
(directory "_media"))
;; Use maim to screenshot
(shell-command (format "mkdir -p %s/%s" default-directory directory))
(shell-command (format "xclip -selection clipboard -t image/png -o > %s/%s/%s.png" default-directory directory filename ))
(defun my-take-screenshot ()
(interactive)
(let
;; Read Filename from Minibuffer
((filename (read-from-minibuffer "image file name: "))
(directory "_media"))
;; Use maim to screenshot
(shell-command (format "maim --select %s/%s/%s.png" default-directory directory filename ))