Skip to content

Instantly share code, notes, and snippets.

View ChapelR's full-sized avatar

Chapel ChapelR

View GitHub Profile
@ChapelR
ChapelR / harlowe-transfer.js
Created December 28, 2018 09:14
Harlowe: Transfer Data Between Episodes
(function () {
// transfer Harlowe data between stories via local storage
var _state = State; // scope hack the state
var storageKey = '%%twine-game-episode-transfer'; // change this to something with your story's title in it
var hasStorage = (function () {
return !!window.localStorage;
}());
@jsoma
jsoma / README.md
Last active December 17, 2022 02:54
Installing tweego and story-formats on OS X.

Installing tweego is a little more complicated than (I think) it should be, so here's a script to do it for you. If you'd like to one-line it, you can just cut and paste this in Terminal:

/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/jsoma/5ef3045b2004a610455f371479a6f0cf/raw/b6c9224faa18fd52f3e1bf7120af17eed6da8ec1/tweego.sh)"

Once it's installed, tweego docs are here. You'll probably want to read these twee docs, too.

@plugnburn
plugnburn / README.md
Last active February 7, 2023 17:12
Landmark - a minimalistic and extensible Markdown compiler in JavaScript

Landmark: the simplest Markdown engine for the browser

Landmark is a small but extensible JavaScript library that allows to render Markdown documents into HTML. It's the primary engine for Sitemark and some other projects.

Usage

Landmark features only 2 methods:

@nicbell
nicbell / 1_primitive_comparison.js
Last active September 23, 2022 16:56
JavaScript object deep comparison. Comparing x === y, where x and y are values, return true or false. Comparing x === y, where x and y are objects, returns true if x and y refer to the same object. Otherwise, returns false even if the objects appear identical. Here is a solution to check if two objects are the same.
//Primitive Type Comparison
var a = 1;
var b = 1;
var c = a;
console.log(a == b); //true
console.log(a === b); //true
console.log(a == c); //true
console.log(a === c); //true