Skip to content

Instantly share code, notes, and snippets.

Avatar

Eli Mellen eli-oat

View GitHub Profile
@eli-oat
eli-oat / lbForth.c
Created Sep 7, 2020 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
View lbForth.c
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@eli-oat
eli-oat / html.lisp
Created Jul 26, 2020 — forked from markasoftware/html.lisp
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.
https://html.spec.whatwg.org/multipage/syntax.html#void-elements")
(defvar *html-escapes*
'(#\& "&amp;"
#\< "&lt;"
#\> "&gt;"
#\" "&quot;"))
@eli-oat
eli-oat / clean.el
Created May 15, 2020 — forked from rougier/clean.el
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))))
@eli-oat
eli-oat / MakeActiveChartOverlapRange.bas
Created Apr 9, 2020 — forked from mjdescy/MakeActiveChartOverlapRange.bas
Make active Excel chart overlap a range completely
View MakeActiveChartOverlapRange.bas
Option Explicit
Public Sub SetActiveChartToCompletelyCoverARange()
Call ResizeAndRepositionChart( _
Chart:=ActiveChart, _
Range:=AskUserToInputARange())
End Sub
Private Sub ResizeAndRepositionChart(ByRef Chart As Excel.Chart, ByRef Range As Excel.Range)
If Chart Is Nothing Then
View imagemagick-dither.sh
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/*
@eli-oat
eli-oat / generate.c
Created Mar 4, 2019 — forked from munificent/generate.c
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
@eli-oat
eli-oat / webmention.js
Created Jan 22, 2019 — forked from am1t/webmention.js
Javascript snippet to fetch Webmentions
View webmention.js
var post_url = window.location.href;
$(document).ready(function(){
$("ul#mentions-list").empty();
$.getJSON("https://webmention.io/api/mentions?per-page=50&page=0&jsonp=?", {
target: post_url
}, function(data){
var social_media_likes = "";
var social_media_repost = "";
var social_media_post = "";
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@eli-oat
eli-oat / emacs.md
Created Jul 5, 2018 — forked from huytd/customize.material-dark-theme.md
My minimal Emacs config
View emacs.md

Screenshot:

Custom keybinding:

  General:
    SPC /     : ripgrep
    SPC TAB   : previous buffer
    SPC SPC   : Open M-x
@eli-oat
eli-oat / README.md
Created Apr 26, 2018 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client (gmail example)
View README.md

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
You can’t perform that action at this time.