Skip to content

Instantly share code, notes, and snippets.

View JoshuaGrams's full-sized avatar

Joshua Grams JoshuaGrams

  • Vienna, Maine, USA
View GitHub Profile
{
"origin":["#noggin##slog#"],
"noggin":["head","beezer","noggin","skull","scalp","pate","poll","noodle","block","noddle","mazard","occiput","dome","nut","helm","brain","mind","cerebrum","psyche","mind","bean","conk"],
"slog":["heck","slog","bleh","bleck","eep","geez","gah","derp","tosh","feh","ack","bah","rat","nuts","crud","rust","rant","twit","herd","goof","gape","flout","foist","flop","lord","load","fake","sack","zooks","knocker","zoinks","wit","tastic","end","botch","chump","scut","dish","plod","drudge","grub","moil"]
}

The conversation system from Glass by Emily Short

A quick code walkthrough by Josh Grams

This is actually pretty straightforward: it's just very spread out and there's a lot of boilerplate directing everything you type to the conversation system, so it's easy to miss the important parts.


@JoshuaGrams
JoshuaGrams / N.js
Created November 2, 2022 23:31
Creating/modifing DOM [N]odes.
// ---------------------------------------------------------------------
// N: (Node) Add attributes, properties, and children to a DOM node
// (possibly creating it first).
// args:
// target: an Element or a tag name (e.g. "div")
// then optional in any order (type determines function)
// Element: child
// string: text node child
// array: values are treated as args
// null/undefined: ignored

Do you have reading recommendations about the science and ecology of farming? Where can a beginner explore these interdependencies you've mentioned?

For vegetable gardening, Eliot Coleman's [New Organic Grower][] is a classic talking about how to design and run a small vegetable operation. He's insatiably curious and he's trying to give you the tools you need to make your own decisions for your own situation rather than giving you a concrete recipe that may quickly become outdated.

@JoshuaGrams
JoshuaGrams / outline-numbers.json
Last active November 9, 2021 22:50
Phoenix-style outline numbers
{
"SWRAOER": "0",
"WUPB": "1",
"TWO": "2",
"THRAOE": "3",
"TPOUR": "4",
"TPAOEUFB": "5",
"SEUBGS": "6",
"SAEFB": "7",
"AEUGT": "8",
@JoshuaGrams
JoshuaGrams / a-readme.md
Last active August 15, 2021 11:13
Bundle javascript inline into html files

Put into your source directory. Run with node bundle-scripts.js on the command line. You can probably put the command into a .bat file (Windows) or .sh file (Mac OSX, Linux) so you can just double-click it to build?

@JoshuaGrams
JoshuaGrams / reveal.tw
Last active April 2, 2024 08:26
Line-by-line text reveal: Twine/SugarCube.
:: Some Passage
This will show at the start.
@@.hide;This will show after you click or press space/enter.@@
@@.hide;.nocontinue;This will show after you advance again, but will <em>not</em> have the continue marker.@@
<span class="hide">HTML tags work fine too, but the other notation is shorter.</span>
@JoshuaGrams
JoshuaGrams / main.js
Last active May 5, 2021 12:50
Extremely basic storylets in Ink
(function(storyContent) {
var story = new inkjs.Story(storyContent);
var storyContainer = document.querySelectorAll('#story')[0];
function showAfter(delay, el) {
setTimeout(function() { el.classList.add("show") }, delay);
}
@JoshuaGrams
JoshuaGrams / key.tw
Last active September 20, 2020 09:55
Lock and Key: TinyQBN/SugarCube
:: StoryTitle
Lock and Key: Variable in SugarCube
:: Start
<<set $key to false>>
<<include "LocationCheck">>
:: Front-Room [sticky-card req-not-passage-Front-Room]
<<include "LocationCheck">>