Skip to content

Instantly share code, notes, and snippets.

Avatar
🍊

Lauren Lee McCarthy lmccart

🍊
View GitHub Profile
View test.html
<!DOCTYPE html>
<html>
<body>
<!-- hamachi -->
<object type="application/x-vlc-plugin" data="rtsp://admin:someone@192.168.7.181:554/live1.sdp" width="500" height="375" id="video1">
<param name="movie" value="rtsp://admin:someone@192.168.7.181:554/live1.sdp">
<embed type="application/x-vlc-plugin" name="video1" autoplay="no" loop="no" width="500" height="375" target="rtsp://admin:someone@192.168.7.181:554/live1.sdp" />
</object>
View template.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<link href="https://fonts.googleapis.com/css?family=PT+Serif" rel="stylesheet">
<style>
body {
margin: 0;
@lmccart
lmccart / interaction-device.js
Created Oct 22, 2018
interaction-device.js
View interaction-device.js
//////////////////////////////////////////////////////////////////////
// mouseX, mouseY
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(200, 20, 20, 10);
ellipse(mouseX, mouseY, 50, 50);
View generated-score-p5.js
/////////////////////////////////////////////////////////////////////////////////
///// INTRO P5 / ABSTRACT SCORE (20 mins)
// editor.p5js.org
createCanvas(w, h);
setup() and draw();
background('name');
@lmccart
lmccart / sketch.js
Last active Sep 14, 2018
test.html
View sketch.js
function setup() {
createCanvas(400, 400);
}
function touchEnded(e) {
console.log(e);
}
View printer-example.js
// https://github.com/song940/node-escpos
var path = require('path');
var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var escpos = require('escpos');
process.on('uncaughtException', function (err) {
View timetest.js
// library to use: https://momentjs.com/docs/#/query/
var data = [{ts: "5/8/blah" , secret:"i washed jeans", value:"immediately"}, {}];
function getAllReady(arr) {
var newArr = [];
for (var i=0; i<data.length; i++) {
var now = new Date().getTime();
var ts = data[i].ts;
@lmccart
lmccart / content_script.js
Created Nov 10, 2014
popup to main tab inject (chrome extension)
View content_script.js
$("#change").click(function() {
$.ajax({
url: "http://api.openweathermap.org/data/2.5/weather?id=5128581&units=imperial",
dataType: 'json',
success: function(data) {
changeMainPage(data);
},
@lmccart
lmccart / gist:0d197f91806b42caf123
Last active Feb 11, 2018
Arduino Yun + node.js + p5.js
View gist:0d197f91806b42caf123
// 1. Setup project on Heroku (SEE OTHER SHEET)
// 2. Setup app
//////////////////////////////////////////////////
//// RANDOM BLINK TIMER
//// NODE
// You will need to install the express module
// http://expressjs.com
View 13_data_code.js
///////////////////////////////////////////////////// p5.js
var data;
var x = 100;
var y = 200;
function preload() {
data = loadTable('results.csv', 'header');
}