Skip to content

Instantly share code, notes, and snippets.

View MichaelPaulukonis's full-sized avatar

Michael Paulukonis MichaelPaulukonis

View GitHub Profile
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
if( dir[dir.length-1] != '/') dir=dir.concat('/')
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
@MichaelPaulukonis
MichaelPaulukonis / Vermicelli-like oar Gutenberg-tm God Greeks
Last active December 1, 2015 04:21
Vermicelli-like oar Gutenberg-tm God Greeks
http://project.cyberpunk.ru/lib/neuromancer/ Humiliation rust device
Over Shore what need me royal against lodge
Vermicelli-like oar Gutenberg-tm God Greeks
1
A sound that some magnitude flew the bomb on spasmodic, humped to a
vast round. One is Hence in nature have stabbing, " Paul officered
@MichaelPaulukonis
MichaelPaulukonis / a.notes.md
Last active May 11, 2023 11:36
Github repo as narrative
@MichaelPaulukonis
MichaelPaulukonis / README.md
Last active November 28, 2015 04:58
Stop we Yonderboy (Call me Ishmael)
@MichaelPaulukonis
MichaelPaulukonis / github.narrative.txt
Created November 18, 2015 02:50
github repository as narrative
On Sun Oct 25 2015 19:27:52, dariusk opened a new issue called "Resources". But it's an admin issue, so who cares?
On Sun Oct 25 2015 19:28:38, dariusk opened a new issue called "Procedural Visual Novel".
On Sun Oct 25 2015 19:55:08, bcj opened a new issue called "An Attempt to Exhaust Memory to Simulate a Place to Attempt to Exhaust".
On Sun Oct 25 2015 22:41:47, zachwhalen opened a new issue called "Using a password dump for a corpus".
On Mon Oct 26 2015 00:20:15, MaxBittker opened a new issue called "char-rnn + Interactive Fiction + scraped news".
On Mon Oct 26 2015 01:31:20, beaugunderson opened a new issue called "Poetry as corpus".
On Mon Oct 26 2015 02:23:24, hugovk opened a new issue called "In!".
On Mon Oct 26 2015 04:31:37, hugovk opened a new issue called "Press Coverage". But it's an admin issue, so who cares?
On Mon Oct 26 2015 04:45:18, ojahnn opened a new issue called "Sound over meaning".
On Mon Oct 26 2015 08:05:52, cpressey opened a new issue called "Compiler pipeline + writers' techniques =
@MichaelPaulukonis
MichaelPaulukonis / README.md
Created November 13, 2015 20:14
The Generative {{GIANT}} Who had No Heart In His Body

index.js -l 20 --max 80 --min 1 > sample.txt

This generated 20 story-loops, with a maximum of 80 helpers, and a minimum of 1 helper per loop.

Total words: 54,506

@MichaelPaulukonis
MichaelPaulukonis / round.one.txt
Created November 6, 2015 04:06
The Generative Giant who had No Heart in its Body
A king had seven sons, and when the other six went off to find brides,
he kept the youngest with him because he could not bear to be parted
from them all. They were supposed to bring back a bride for him, as
well, but they found a king with six daughters and wooed them,
forgetting their brother. But when they returned, they passed too
close to a giant's castle, and he turned them all, both princes and
princesses, to stone in a fit of rage.
When they did not return, the king, their father, tried to prevent
@MichaelPaulukonis
MichaelPaulukonis / 1_notes.md
Last active August 29, 2015 14:19
Discourse notifications parser (from local file)

In http://bbs.boingboing.net there is a little game that where we communicate only by changing the text of the thread title/subject. While edits are archived in vanilla Discourse, certain agitators had this data removed from public access.

Now, the originator of the thread still receives notifications, but some hoops must be jumped-through.

I grabbed the list by going to my notifications, opening page-inspector, selecting the element that held the notifications, copied the innerHTML and save that to a file.

This file is then processed via node.js - see eat.js

Caveats - title-edits by the thread originator are not visible, since the originator receives no notifications regarding own edits.

@MichaelPaulukonis
MichaelPaulukonis / hmk0.md
Created April 8, 2015 20:50
NaPoGenMo2015

opening fragments of Cory Doctorow's Down and Out in the Magic Kingdom run through the transformers "shortlines" and then "heijinian"

node shortlines.js < magic.kingdom.txt | node heijinian.js > hmk0.txt

These are framing devices, but the simple effects are nice.

"TIME CUBE
4ce"In 1884, meridian time personnel met in Washington to
change Earth time. First words said was that
only 1 day
could be used on Earth
to not change the 1 day bible. So they
applied the 1 day and ignored the other 3 days.
The bible
time was wrong then and it proved wrong
today. This a major