Skip to content

Instantly share code, notes, and snippets.

View eli-oat's full-sized avatar

Eli Mellen eli-oat

View GitHub Profile
@eli-oat
eli-oat / see.md
Created June 26, 2021 17:20 — forked from RickCarlino/see.md
Retroforth SEE implementation (sort of)

dump - A simple way to peek memory addresses.

Provides a word called dump.

Output looks like this:

> [ 'Hello,_world! s:put nl ] dump
3B9F: 0x801
3BA0: 0xE5D

3BA1: H

@eli-oat
eli-oat / test.md
Created January 3, 2021 21:03 — forked from ityonemo/test.md
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@eli-oat
eli-oat / lbForth.c
Created September 7, 2020 23:17 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <[email protected]> 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 July 26, 2020 10:49 — forked from markasoftware/html.lisp
html->string (Super simple HTML templating for 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 22:33 — forked from rougier/clean.el
A very minimal but elegant emacs configuration file
(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 April 9, 2020 19:19 — forked from mjdescy/MakeActiveChartOverlapRange.bas
Make active Excel chart overlap a range completely
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
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 March 4, 2019 02:39 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#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 January 22, 2019 21:26 — forked from am1t/webmention.js
Javascript snippet to fetch Webmentions
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 = "";
@eli-oat
eli-oat / tmux-cheatsheet.markdown
Created November 9, 2018 03:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname