This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////////////////////////////// p5.js | |
var data; | |
var x = 100; | |
var y = 200; | |
function preload() { | |
data = loadTable('results.csv', 'header'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.dom.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/addons/p5.sound.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<script type="text/javascript" src="https://l2.io/ip.js?var=userip"></script> | |
<meta charset="utf-8" /> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>jQuery demo</title> | |
<link rel="stylesheet" href="style.css"></link> | |
<script src="jquery.js"></script> | |
<script src="main.js"></script> | |
</head> | |
<body> | |
<!-- delete any width and height info from url --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Stylin Page</title> | |
<style> | |
p { | |
color: green; | |
font-size: 20px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if mouse x | |
if (mouseX > width/2) { | |
background(0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createDataAnimation: function(filename) { | |
var me = this; | |
return function(p) { | |
var u = new utils(p); | |
var w = 640, h = 480; | |
var frameNumber = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////// | |
// JAVASCRIPT | |
// * JavaScript provides the ability to add interactivity to a website, and help enrich the user experience. | |
// * HTML provides a page with structure and CSS provides a page with style, JavaScript provide a page with behavior. | |
// * Like CSS, JavaScript should be saved in an external file with the .js file extension, and then referenced within | |
// an HTML document using the script element. | |
// <script src="script.js"></script> | |
// * Demo file setup | |
// * Demo console.log() | |
<!DOCTYPE html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////// 01_WIDTH UNITS | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CSS layout</title> | |
<link rel="stylesheet" href="style.css"></link> | |
</head> | |
<body> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer maximus ipsum urna. Suspendisse sit amet scelerisque tellus. Aenean tempus, purus in dictum luctus, purus odio dapibus ipsum, et maximus neque sapien eget ex. Quisque urna nibh, commodo non enim at, lobortis ultricies diam. Sed lectus arcu, sodales vitae mollis nec, luctus nec arcu. Vestibulum neque mi, tristique eu commodo et, commodo efficitur turpis. Pellentesque commodo libero velit, a vestibulum urna fermentum id. Suspendisse interdum nibh nibh, ac feugiat velit condimentum sit amet. Vivamus non arcu sit amet massa malesuada placerat lobortis in massa. Duis porta vehicula maximus.</p> |