Skip to content

Instantly share code, notes, and snippets.


Mark Sample samplereality

View GitHub Profile
samplereality / Install Tweego 2.1.1 on
Last active Dec 4, 2020 — forked from JoshuaGrams/Install Tweego 2.1.1 on
Installing tweego and story-formats on OS X.
View Install Tweego 2.1.1 on

To download and run this script in a single command, cut and paste this in Terminal:

curl | bash
View game.txt
samplereality /
Created Apr 8, 2019
Quick Python script to randomize @mobydickatsea's tweets, run 7 times before each new cycle of the collection of lines.
import random
lines = open('mobytweet.txt').readlines()
open('mobytweet.txt', 'w').writelines(lines)
samplereality / style.css
Created Apr 25, 2018
Sample CSS for Twine's Harlowe story format
View style.css
html {
background-color: #000000;
color: #ffffff;
font: 135% Georgia, sans-serif;
tw-story {
line-height: 1.4;
samplereality /
Created Dec 11, 2015
DPLAbot Code (minus API credentials)
import re, random, tweepy
from wordnik import *
import inflect
from PIL import Image
from dpla.api import DPLA
import urllib
p = inflect.engine()
views = []
samplereality / randomwalk.html
Created Oct 31, 2015
Web implementation of Margaret Chisman's "Life is Random Walk"
View randomwalk.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Life is a Random Walk</title>
<meta name="description" content="Life is Random Walk" />
<style type="text/css" media="screen">
samplereality / plums.html
Created Feb 11, 2015
A web-based version of JustToSayBot
View plums.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>This Is Just To Say</title>
<meta name="description" content="This Is Just To Say" />
<style type="text/css">
samplereality / whales.html
Created Feb 11, 2015
Moby Dick in Markov Chains
View whales.html
<canvas id="canvas" width=1200 height=400 style="border: 0px dashed #000000; display: block; margin:0 auto;"></canvas>
<script src="rita.js"></script>
var rm = new RiMarkov(RiTa.random(2,5));
# Any line that begins with a hash (pound sign) is ignored by the program
# Like this one
# These are called comments
# Think of comments in code as marginalia
# This Is Just To Say
# William Carlos Williams, 1883 - 1963
# I have eaten
# the plums
import random
possibleKings = ['king', 'queen', 'Elvis impersonator']
possibleVerbs = ['dead', 'sleeping', 'dying', 'singing']
king = random.choice(possibleKings)
dead = random.choice(possibleVerbs)
print 'The ' + king + ' is ' + dead + '. Long live the ' + king + '.'