Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Sample samplereality

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

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
View game.txt
{"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 Apr 8, 2019
Quick Python script to randomize @mobydickatsea's tweets, run 7 times before each new cycle of the collection of lines.
View randomizeMDick.py
import random
lines = open('mobytweet.txt').readlines()
random.shuffle(lines)
open('mobytweet.txt', 'w').writelines(lines)
@samplereality
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
samplereality / dplabot.py
Created Dec 11, 2015
DPLAbot Code (minus API credentials)
View dplabot.py
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 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">
<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 Feb 11, 2015
A web-based version of JustToSayBot
View plums.html
<!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 Feb 11, 2015
Moby Dick in Markov Chains
View whales.html
<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));
View just_to_say.py
# 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
View king.py
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 + '.'