Skip to content

Instantly share code, notes, and snippets.

View robynitp's full-sized avatar

Robyn Overstreet robynitp

  • NYU ITP
  • New York, NY
View GitHub Profile
@robynitp
robynitp / h4_index.js
Last active August 29, 2015 14:16
for ainsley
var title = "What I'm Drinking Now";
//var cocktails = [];
var marioB;
var crocs;
var clickCounter = -1;
var cocktails;
var value = 0;
function preload() {
cocktails = loadStrings("cocktails.txt"); // this is an array
@robynitp
robynitp / lisasketch.js
Created March 5, 2015 21:05
Pixel manipulation in P5
var img;
function preload(){
img = loadImage("lisa.png");
}
function setup(){
createCanvas(500,382);
image(img,0,0);
loadPixels();
@robynitp
robynitp / api_demo.html
Last active August 29, 2015 14:16
Reading JSON with p5.js
<!DOCTYPE HTML>
<html>
<head>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.2/p5.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.2/addons/p5.dom.js"></script>
<script language="javascript" type="text/javascript" src="sketch.js"></script>
</head>
<body>
<h1>Hello JSON</h1>
@robynitp
robynitp / README.md
Last active June 6, 2021 15:06
Movie JSON example

Publish some JSON data of your own by forking this gist. Delete my example data and add your own. It can be anything: a list of your favorite songs, statistics on global warming, the number of steps you took in a day. It should be in valid JSON. Use JSON Editor Online to check if your JSON is valid.

For an additional JSON example see this gist with weather data as well as the example files in the JSON folder for week 2.

@robynitp
robynitp / README.md
Last active August 29, 2015 14:14
Beginning Servi, Step by Step

Networked Media Week 1 Assignment

Spring 2015

The focus of this assignment is process over product. Each example script builds on the previous one. We're starting small and working iteratively. Download this gist and work off of my examples to build your own scripts. You should run the code on your local machine using Node and Servi. See below for how to submit the completed exercise.

TASK: Create a server in Servi to manage a barebones, text-based website. The site will have the following elements:

  1. A home page
  2. Two or more additional static pages, such as "About", "Jokes", "Cat Photos", "Resume", etc. etc.
  3. A set of dynamically generated pages that all have the same basic structure, but change content based on information provided by the user in the URL. For example, on Facebook, each person's profile page looks basically the same, it just has their particular name, posts, photos, etc. Of course, your task is much more simple. For example you might have a page that says "Hello Jack" vs. "H
@robynitp
robynitp / Smoke.pde
Last active August 29, 2015 14:10 — forked from marsimaria/Smoke
// A simple Particle class, renders the particle as an image
class Particle {
PVector loc;
PVector vel;
PVector acc;
float lifespan;
PImage img;
@robynitp
robynitp / servi-load-stuff.js
Last active August 29, 2015 14:10
load URL and load JSON file in servi.js
var servi = require('servi');
var app = new servi(true);
var http = require('http');
start();
route('/', showHome);
function showHome(request){
// load a local JSON file
loadJSON('weather.json',function(data){
@robynitp
robynitp / index.html
Last active August 29, 2015 14:10
Show and hide divs based on click
<!DOCTYPE HTML>
<html>
<head>
<title>Hello World</title>
<!-- the jquery script from the internet -->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<!-- your custom javascript -->
<script src="onescript.js"></script>
<!-- CSS : look at this file to see how things are styled-->
<link rel="stylesheet" type="text/css" href="mystyle.css">
@robynitp
robynitp / README.md
Last active August 29, 2015 14:10
Servi Step By Step

Networked Media Week 5 Assignment

Create a server in Servi to manage a simple web site. The site will have, at minimum, the following pages:

  • Home page
  • A static page, for example, "About" or "FAQ"
  • A set of dynamically generated pages that all have the same structure but contain different data. For example, in an online store, each product has its own page and all of the product pages use the same template.

The focus of this assignment is process over product. You will build out the site using an iterative process, starting small and adding new features to your project as you go. Instead of turning in a URL to a live server, as we've done in previous assignments, you'll turn in a link to a gist project containing 3 files.

{
"coord": {
"lon": -74.01,
"lat": 40.71
},
"sys": {
"type": 1,
"id": 1980,
"message": 0.115,
"country": "US",