Skip to content

Instantly share code, notes, and snippets.

View lisawilliams's full-sized avatar

Lisa Williams lisawilliams

View GitHub Profile
@lisawilliams
lisawilliams / gist:5000732
Last active December 14, 2015 00:39
This is the (Processing) code for my #WhenIOwnTheGlobe offering. It involves a giant laser pointer and LOLCats.
// I couldn't quite get processing.js to run for this one, which is why it's an animated gif
//<script type="text/javascript" src="processing.min_.js">
//</script>
//<script type="text/processing" data-processing-target="processing-canvas">
float step = 0.0f;
// The next line is needed if running in JavaScript Mode with Processing.js
// @pjs preload="bosglobe.jpg";
@lisawilliams
lisawilliams / Texts From Hillary meme using NYT API
Created February 21, 2013 22:27
This is a Processing sketch which uses live data from the NYT Article Search API to create a "Texts from Hillary" meme. More about why (or whether) Bill got more mentions here: http://dataforradicals.com/texts-from-hillary
import blprnt.nytimes.*;
// Line above imports a Processing library that makes it easier to deal with the API
PImage bg;
int y;
//void setup() {
size(652, 360);
bg = loadImage("hillary.jpg");
//}
@lisawilliams
lisawilliams / Repeating circles
Last active December 14, 2015 23:39
A small processing sketch demonstrating a for loop.
// Define size of canvas
size(480, 120);
// Set background color (black)
background(0);
// Anti-alias:
smooth();
// making shapes without an outer line:
@lisawilliams
lisawilliams / gist:5209571
Last active December 15, 2015 05:29
Carto markup for TileMill map of kids in Early Intervention programs in Rhode Island. See map here: http://dataforradicals.com/tilemill-and-mapbox-are-pretty-fun/
Map {
background-color: #b8dee6;
}
#countries {
::outline {
line-color: #1889a2 ;
line-width: 2;
line-join: round;
}
@lisawilliams
lisawilliams / gist:5281094
Created March 31, 2013 15:59
Easter Egg Sketch in Processing
// easter egg sketch!
// set the size of the background
size (360, 240);
// set the color of the background (robin's egg blue)
@lisawilliams
lisawilliams / gist:5282031
Created March 31, 2013 21:16
Easter Egg Sketch 2. This one uses a loop to change the color of the eggs.
// easter egg sketch!
// set up some variables for the egg colors.
// taken together, these are RGB purple
int r = 206;
int g = 93;
int b = 219 ;
@lisawilliams
lisawilliams / gist:5392670
Last active January 30, 2017 22:18
For "The Insanely Illustrated Guide To Your First Tile Mill Map," dataforradicals.com
Map {
background-color: #b8dee6;
}
#countries {
::outline {
line-color: #1889a2 ;
line-width: 2;
line-join: round;
}
@lisawilliams
lisawilliams / gist:5503844
Created May 2, 2013 17:28
HTML of the inaugural front page of FvckTheMedia.com
<!DOCTYPE html>
<!-- MSO IS KING -->
<html>
<head profile="http://www.w3.org/2005/10/profile">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="media.css" />
<title>The Media</title>
<link rel="icon"
type="image/png"
@lisawilliams
lisawilliams / gist:5591383
Created May 16, 2013 12:30
Roberto Rocha's attempt to do a tabletop-to-datatables example using F1 car drivers. Why doesn't it work? Public spreadsheet URL: https://docs.google.com/a/placeblogger.com/spreadsheet/pub?key=0ArP8859PKYs8dEpUQ3hLejA1TVo1cWxPbnBVNy11TGc&output=html Roberto's example URL: http://mojotrotters.com/gp/driver-profiles.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
table.myTable { border-collapse:collapse; }
table.myTable td, table.myTable th { border:1px solid black;padding:0px; }
@lisawilliams
lisawilliams / gist:5805682
Created June 18, 2013 14:14
JSON of the Twitter hashtag #bulger, captured on 6/18/2013 at 10AM EST. I got this using the Apogee Twitter API explorer/console: https://dev.twitter.com/console. Now, how do I visualize it?
HTTP/1.1 200 OK
content-type:application/json;charset=utf-8
x-frame-options:SAMEORIGIN
x-rate-limit-remaining:176
last-modified:Tue, 18 Jun 2013 14:12:40 GMT
status:200 OK
date:Tue, 18 Jun 2013 14:12:40 GMT
x-transaction:c0b19d71d17fda79
pragma:no-cache
cache-control:no-cache, no-store, must-revalidate, pre-check=0, post-check=0