I hereby claim:
- I am ashton314 on github.
- I am ashton314 (https://keybase.io/ashton314) on keybase.
- I have a public key ASAGVAKmpoeIZ8lp6vPnxzyS3oyH-v2vhhrxZODU-hA3ego
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| defmodule Mix.Tasks.Docker.Db do | |
| use Mix.Task | |
| @project_name "Program Builder" | |
| @project_sname "program_builder" | |
| @shortdoc "Start/stop the docker Postgres container for development" | |
| @moduledoc """ | |
| Fire up a postgres database for #{@project_name}, named #{@project_sname} in Docker. |
| #lang racket | |
| ;; First, define the undo stack with a few helper functions | |
| (define *undo-stack* '()) | |
| (define (push-undo! command) | |
| (set! *undo-stack* (cons command *undo-stack*))) | |
| (define (pop-undo!) | |
| (let ([head (car *undo-stack*)]) |
| ;; Pandoc conversion function | |
| ;; Requires f.el, as well as pandoc and pandoc-citeproc installed on the host system. | |
| ;; If on macOS, install with `brew install pandoc pandoc-citeproc' | |
| (defcustom pandoc-converter-args "--filter pandoc-citeproc --pdf-engine=xelatex" "Additional arguments to pass to pandoc when running `convert-with-pandoc'") | |
| (defun convert-with-pandoc () | |
| "Convert a file between formats with Pandoc. | |
| This will place the outputted function in the same directory as | |
| the source folder. |
| #lang racket | |
| (define *remaining-choices* '()) | |
| (define (choose choices) | |
| (call/cc | |
| (λ (k) | |
| (for ([i (cdr choices)]) | |
| (set! *remaining-choices* (cons (cons k i) *remaining-choices*))) | |
| (k (car choices))))) |
| #lang racket | |
| ;; Demonstration of a turing-complete language | |
| (define (ev e [ρ '()]) | |
| (match e | |
| [(? symbol? x) (cadr (assoc x ρ))] | |
| [`(λ (,xs ...) ,es) `(cls ,ρ ,xs ,es)] | |
| [`(,f ,as ...) | |
| (match (ev f ρ) | |
| [`(cls ,cρ ,xs ,es) (ev es (append (map list xs (map (λ (v) (ev v ρ)) as)) cρ ρ))])])) |
| (defvar bootstrap-version) | |
| (setq straight-repository-branch "develop") | |
| (let ((bootstrap-file | |
| (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) | |
| (bootstrap-version 5)) | |
| (unless (file-exists-p bootstrap-file) | |
| (with-current-buffer | |
| (url-retrieve-synchronously | |
| "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" |
| # -*- mode: snippet -*- | |
| # name: pipe inspect | |
| # key: pi | |
| # -- | |
| |> IO.inspect(label: "$1") | |
| $0 |
This guy’s tutorials look pretty excellent:
| ;; Resource: https://stackoverflow.com/questions/11206140/typewriter-sounds-for-emacs | |
| (defvar tink "/System/Library/Sounds/Tink.aiff") | |
| (defun play (file) | |
| (let ((buf (get-buffer-create "playnoise"))) | |
| (start-process-shell-command "play" buf (concat "afplay " file)))) | |
| (defun do-tink () | |
| (play tink)) |