Skip to content

Instantly share code, notes, and snippets.

View eli-oat's full-sized avatar

Eli Mellen eli-oat

View GitHub Profile
/**
* 8x8 monochrome bitmap fonts for rendering
* Author: Daniel Hepper <[email protected]>
*
* License: Public Domain
*
* Based on:
* // Summary: font8x8.h
* // 8x8 monochrome bitmap fonts for rendering
* //
@cpbotha
cpbotha / init.el
Last active February 6, 2023 10:45
;; minimal version of my Emacs setup which approximates the effective points per inch on your screen
;; and then selects your default font pts based on that
;; Also works on wayland / WSLg because it parses out physical dims from weston.log (necessary in 2023-01)
;; LIMITATION: Will probably not work on multi-monitor setups. Exercise for the reader!
;; BSD 3-clause copyright Charl P. Botha <[email protected]>
(defun get-mon-attr (which)
(cdr (assoc which (car (display-monitor-attributes-list)))))
(defun get-monitor-width-mm ()
@huytd
huytd / wordle.md
Last active November 1, 2024 05:07
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@non
non / grep.tal
Last active February 10, 2022 03:52
Regex implementation in Uxntal. Includes a simple grep implementation was well as a REPL for testing.
( grep.tal )
( )
( by d_m )
( print a character to STDOUT )
%emit { #18 DEO }
( the first argument to grep is the regex )
( arguments are passed on STDIN, so we just )
( assume the first "line" is the argument )
@baldurbjarnason
baldurbjarnason / Makefile
Last active September 28, 2021 12:51
node-less frontend testing using Firefox and TAP
.PHONY:test
test:
rm -rf ./my-profile; mkdir ./my-profile && echo "user_pref('devtools.console.stdout.content', true);user_pref('dom.allow_scripts_to_close_windows', true);user_pref('datareporting.policy.firstRunURL', '');" > ./my-profile/user.js && firefox --headless -profile ./my-profile -no-remote `pwd`/index.html | sed -n "/console.log: /p" | sed -e 's/console.log: "//' -e 's/"$$//' | ./tapview
@RickCarlino
RickCarlino / see.md
Last active June 27, 2021 14:24
Retroforth SEE implementation (sort of)

dump - A Memory Inspector for RetroForth

Two words are provided below: a regular dump word, plus a dump-s word for dealing with strings.

Example output:

> #16 [ 'Hello,_world! s:put nl ] dump
3C4C: 0x801
3C4D: 0xE97

3C4E: H

@jackrusher
jackrusher / seq-primer.clj
Created June 1, 2021 12:55
Condensed visual tutorial in #Bauhaus style for a subset of the #Clojure seq API (inspired by similar JS tweets)
(def ■ '■)
(def ▲ '▲)
(def ● '●)
(first [● ■ ▲]) ; ●
(second [● ■ ▲]) ; ■
(nth [● ■ ▲] 2) ; ▲
(rest [● ■ ▲]) ; (■ ▲)
(last [● ■ ▲]) ; ▲
(butlast [● ■ ▲]) ; (● ■)
@iamleeg
iamleeg / fizzbuzz.m
Created February 16, 2021 21:31
FizzBuzz in Objective-C
// hey, we've all got a coding interview to crack, right?
#import <Foundation/Foundation.h>
@interface FZBZSparseArray : NSArray
- initWithCount:(NSUInteger)count placeholder:placeholder overrides:overrides;
@end
@interface FZBZWrappedArray : NSArray
- initWrappingArray:underlyingArray;
@ityonemo
ityonemo / test.md
Last active October 25, 2024 15:24
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)