Skip to content

Instantly share code, notes, and snippets.

View samplereality's full-sized avatar

Mark Sample samplereality

View GitHub Profile
@samplereality
samplereality / Install Tweego 2.1.1 on OSX.md
Last active December 4, 2020 02:23 — forked from JoshuaGrams/Install Tweego 2.1.1 on OSX.md
Installing tweego and story-formats on OS X.

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

curl https://gist.githubusercontent.com/JoshuaGrams/845eb0e0cd8e8fb42668028792b37ce7/raw/f7de596a50eff8734483c560560ef441a9f26c33/tweego.sh | bash
@samplereality
samplereality / game.txt
Created November 16, 2019 20:22
flickgame
{"gameLink":"www.flickgame.org","canvasses":[[1664,"0",6,"5",152,"0",14,"5",145,"0",21,"5",96,"0",3,"3",39,"0",28,"5",89,"0",5,"3",36,"0",36,"5",83,"0",6,"3",34,"0",9,"5",2,"0",30,"5",79,"0",8,"3",30,"0",9,"5",10,"0",29,"5",74,"0",11,"3",26,"0",9,"5",17,"0",24,"5",74,"0",14,"3",21,"0",9,"5",24,"0",19,"5",73,"0",18,"3",17,"0",7,"5",32,"0",15,"5",72,"0",23,"3",10,"0",7,"5",37,"0",13,"5",70,"0",24,"3",9,"0",6,"5",43,"0",9,"5",70,"0",23,"3",9,"0",5,"5",45,"0",8,"5",70,"0",9,"3",1,"0",14,"3",8,"0",5,"5",46,"0",7,"5",70,"0",11,"3",3,"0",11,"3",6,"0",6,"5",48,"0",5,"5",71,"0",11,"3",1,"0",12,"3",6,"0",6,"5",48,"0",5,"5",71,"0",24,"3",6,"0",5,"5",49,"0",5,"5",71,"0",24,"3",5,"0",6,"5",33,"0",7,"5",9,"0",5,"5",72,"0",22,"3",6,"0",6,"5",6,"0",10,"5",13,"0",12,"5",8,"0",5,"5",72,"0",6,"3",1,"0",8,"3",1,"0",6,"3",6,"0",5,"5",6,"0",4,"5",3,"6",5,"5",11,"0",5,"5",4,"6",4,"5",8,"0",5,"5",72,"0",13,"3",2,"0",6,"3",7,"0",5,"5",6,"0",3,"5",5,"6",5,"5",10,"0",4,"5",6,"6",3,"5",8,"0",5,"5",73,"0",11,"3",2,"0",7,"3",6,"0",6,"5",6
@samplereality
samplereality / randomizeMDick.py
Created April 8, 2019 13:34
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()
random.shuffle(lines)
open('mobytweet.txt', 'w').writelines(lines)
@samplereality
samplereality / style.css
Created April 25, 2018 14:15
Sample CSS for Twine's Harlowe story format
html {
background-color: #000000;
color: #ffffff;
font: 135% Georgia, sans-serif;
}
tw-story {
line-height: 1.4;
}
@samplereality
samplereality / dplabot.py
Created December 11, 2015 15:26
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
samplereality / randomwalk.html
Created October 31, 2015 17:51
Web implementation of Margaret Chisman's "Life is Random Walk"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<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
samplereality / plums.html
Created February 11, 2015 11:53
A web-based version of JustToSayBot
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<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">
body
@samplereality
samplereality / whales.html
Created February 11, 2015 11:51
Moby Dick in Markov Chains
<html>
<head>
<canvas id="canvas" width=1200 height=400 style="border: 0px dashed #000000; display: block; margin:0 auto;"></canvas>
<script src="rita.js"></script>
<script>
RiTa.p5Compatible(true);
RiText.defaultFont("Georgia",18);
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 + '.'