Skip to content

Instantly share code, notes, and snippets.

@wobh
wobh / blorg-jekyll.org
Last active November 22, 2022 02:41
blorg-jekyll

blorg

(defclass being ()
((health :accessor health :initarg :health)
(injury :accessor injury :initarg :injury)))
(defmethod make-load-form ((being being) &optional environment)
(declare (ignore environment))
`(make-instance ',(class-name (class-of being))
:health ,(health being)
:injury ,(injury being)))
@wobh
wobh / bijective_numeration.lisp
Last active March 26, 2019 10:34
bijective numeration library in Common Lisp
(defpackage #:bijective-numeration
(:nicknames :bij)
(:use #:common-lisp)
(:export #:*base20-en*
#:*base26-en*
#:*base30-en*
#:*base36-en*
#:*digits*)
(:export #:weight
#:digit
@wobh
wobh / word_b20.rb
Last active March 17, 2019 16:28
A draft convenience for making and checking human friendly random input strings for temporary passwords, secondary identifiers, etc.
class WordB20
Base20 = %w( B C D F G H J K L M N P Q R S T V W X Z )
def self.random_b20(word_size)
word_chars = []
word_size.times do
word_chars << Base20.sample
end
word_chars.join("")
end
@wobh
wobh / introrx.md
Created October 26, 2018 03:00 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@wobh
wobh / hilbert-4.txt
Created February 7, 2018 02:10
Hand crafted, artisan Hilbert curves to the fourth order in unicode box drawings
╷╷
└┘
╶┐┌╴
┌┘└┐
│┌┐│
└┘└┘
╷┌─┐┌─┐╷
└┘┌┘└┐└┘
┌┐└┐┌┘┌┐
│└─┘└─┘│
@wobh
wobh / history-memory-experience.lisp
Last active January 25, 2018 03:17
A little game...
;;; History
(defun make-history ()
(let (history)
(lambda (&optional event)
(when (and event
(not (equalp event (first history))))
(push event history))
(first history))))
@wobh
wobh / exemplary_rails_apps.org
Last active October 9, 2017 04:25
Exemplary Rails Applications

Exemplary Rails Apps

Introduction

A list of Exemplary Rails Applications for critical study.

This is a recreation of another list of applications I was studying

@wobh
wobh / str-print.lisp
Last active October 8, 2017 01:55
When print returns the output-stream ...
(defun pr (obj &optional (str *standard-output*))
(princ o str)
str)
;;; ... it becomes possible to chain `pr' expressions together:
;; (pr "!" (pr "world" (pr " " (pr "hello"))))
;;; This means, with a little convenience function (like `format'):
@wobh
wobh / gender_input_form.html
Last active May 24, 2017 20:45
Gender input form
<fieldset>
<legend>What gender of address would you prefer we use in communications?</legend>
<ul>
<li>
<input type="radio"
name="preferred-gender-personal-address"
value="none"
checked/>
<label for="none">None</label>
</li>