Skip to content

Instantly share code, notes, and snippets.

Eli Mellen eli-oat

View GitHub Profile
markasoftware / html.lisp
Last active Jul 27, 2020
html->string (Super simple HTML templating for Lisp)
View html.lisp
(defvar *html-void-tags* '(:area :base :br :col :embed :hr :img :input :link
:meta :param :source :track :wbr)
"String designators for self-closing/void tags.")
(defvar *html-escapes*
'(#\& "&"
#\< "&lt;"
#\> "&gt;"
#\" "&quot;"))
rougier / clean.el
Created May 10, 2020
A very minimal but elegant emacs configuration file
View clean.el
(require 'org)
(setq-default indent-tabs-mode nil)
(setq org-display-inline-images t)
(setq org-redisplay-inline-images t)
(setq org-startup-with-inline-images "inlineimages")
(setq default-frame-alist
(append (list '(width . 72) '(height . 40))))
williamsmj /
Last active Jul 13, 2020
Make printouts from Firefox Reader mode look like dang NYRB artices

To install in Firefox:

  1. If it doesn't already exist, create a folder called chrome in your profile folder. The easiest way to find your profile folder is in about:profiles (there's a "Show in Finder" link for the folder on macOS). Be sure to choose the right profile is you have more than one.

  2. Put userContent.css above in the chrome folder you just created.

  3. Load about:config in Firefox then set toolkit.legacyUserProfileCustomizations.stylesheets to true.

  4. Quit and reopen Firefox, just for luck.

mjdescy / MakeActiveChartOverlapRange.bas
Created Apr 9, 2020
Make active Excel chart overlap a range completely
View MakeActiveChartOverlapRange.bas
Option Explicit
Public Sub SetActiveChartToCompletelyCoverARange()
Call ResizeAndRepositionChart( _
Chart:=ActiveChart, _
End Sub
Private Sub ResizeAndRepositionChart(ByRef Chart As Excel.Chart, ByRef Range As Excel.Range)
If Chart Is Nothing Then
mogrify -path DESTINATIONFOLDER -filter Triangle -define filter:support=2 -thumbnail 1200 -unsharp 0.25x0.08+8.3+0.045 -dither FloydSteinberg -type Grayscale -colors 2 -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB SOURCEFOLDER/*
hisaac /
Last active Apr 15, 2020
Some fish shell functions that I use
# A few simple fish functions I use in my file
function gcd -d "Switches to the develop or development branch, depending on which one is used in this repo"
if git show-ref --verify --quiet refs/heads/develop
git checkout develop
git checkout development
jrc03c / download-canvas-as-image.js
Created Feb 13, 2020
Download the contents of an HTML5 canvas as an image
View download-canvas-as-image.js
function downloadCanvasAsImage(canvas, filename){
let a = document.createElement("a")
a.href = canvas.toDataURL() = filename
a.dispatchEvent(new MouseEvent("click"))
munificent / generate.c
Last active Jul 12, 2020
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
am1t / webmention.js
Last active May 19, 2019
Javascript snippet to fetch Webmentions
View webmention.js
var post_url = window.location.href;
$.getJSON("", {
target: post_url
}, function(data){
var social_media_likes = "";
var social_media_repost = "";
var social_media_post = "";

;; Automatically generated
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(anzu-cons-mode-line-p nil)
You can’t perform that action at this time.