Skip to content

Instantly share code, notes, and snippets.

View gjolleyrogers's full-sized avatar
🎯
Focusing

Garry Jolley-Rogers gjolleyrogers

🎯
Focusing
View GitHub Profile
@minad
minad / polyp.md
Last active February 9, 2024 10:51
Polyp: Small child of the Hydra

Polyp: Small child of the Hydra

;; The undo keybindings `C-x u` and `C-_` enter the polyp.
(defpolyp polyp-undo
  "_u_ndo  _r_edo"
  ("u" undo-fu-only-undo "C-x u" "C-_")
  ("r" undo-fu-only-redo))
@trib0r3
trib0r3 / README.md
Last active May 31, 2023 00:45
Convert Markdown notes into the Hugo pages

md2hugo

These scripts help to convert Markdown notes into the hugo compatibile sites. I created these scripts for converting my notes (format below) into hugo-theme-learn pages.

Requirements

  • hugo installed
  • empty hugo site with optional hugo-theme-learn theme
  • markdown notes in format:
/* sidenotes.js: standalone JS library for parsing HTML documents with Pandoc-style footnotes and dynamically repositioning them into the left/right margins, when browser windows are wide enough.
Sidenotes are superior to footnotes where possible because they enable the reader to immediately look at them without requiring user action to 'go to' or 'pop up' the footnotes; even floating footnotes require effort by the reader.
sidenotes.js is inspired by the Tufte-CSS sidenotes (https://edwardtufte.github.io/tufte-css/#sidenotes), but where Tufte-CSS uses static footnotes inlined into the body of the page (requiring modifications to Pandoc's compilation), which doesn't always work well for particularly long or frequent sidenotes, sidenotes.js will rearrange sidenotes to fit as best as possible, and will respond to window changes.
Particularly long sidenotes are also partially 'collapsed'.
Author: Said Achmiz
2019-03-11
license: MIT (derivative of footnotes.js, which is PD)
*/
@jarmitage
jarmitage / scrivx-to-org.py
Created July 13, 2016 14:20
Convert Scrivener .scrivx file to Emacs org-mode file
import xml.etree.ElementTree as ET
import os
from os.path import join
import io
# 1. Extract Docs and .scrivx from Scrivener using 'Open Package Contents'
# 2. Convert Docs from .rtf to .txt using GNU unrtf and put .txt files in folder called txt
# 3. Run script
dir = 'path/to/scriv'
@TheRayTracer
TheRayTracer / main.cmd
Created May 9, 2012 13:13
A simple C++ implementation of the Levenshtein distance algorithm to measure the amount of difference between two strings.
main.exe kitten sitting
@wildmichael
wildmichael / convertBibDeskLinks.m
Created October 28, 2010 15:07
Converts the Bdsk-File-X base64 encoded aliases created by BibDesk to normal file paths