Skip to content

Instantly share code, notes, and snippets.

View gmisail's full-sized avatar

Graham Misail gmisail

View GitHub Profile
const Roku = require('rokujs');
const roku = new Roku('roku-address');
Roku.discover(function (devices) {
console.log(devices);
/* example response
[ { server: 'Roku UPnP/1.0 MiniUPnPd/1.4',
address: '192.168.2.45',
location: 'http://192.168.2.45:8060/',
Disp "V1: "
Input "X: ",A
Input "Y: ",B
Input "Z: ",C
Disp "V2: "
Input "X: ",D
Input "Y: ",E
Input "Z: ",F
Input "DOT (0) OR CROSS (1)? ",T
---
title: About Me
---
<p>
Let me tell you about myself...
</p>
0→T
(B-A)/N→D
Prompt A,B,N
Menu("Select Method:","Left Riemann",LR,"Right Riemann",RR,"Midpoint Riemann",MR)
Lbl LR
For(G,A,B-D,D
Y₁(G)+T→T
<html>
<body>
<h1>{{title}}</h1>
{{{body}}}
</body>
</html>
---
title: Home
date: 20000909
---
<p>Hello!</p>
@gmisail
gmisail / index.js
Last active January 29, 2018 18:27
var canvas = document.getElementById("view"); // get the canvas context from our webpage
var context = canvas.getContext("2d"); // get the 2d context from our canvas. our canvas has several contexts, however we want to get the 2D context.
var x = 0; // x variable that is equal to 0
var y = 0; // y variable that is equal to 0
function drawRectangle(){ // function called drawRectangle that draws a rectangle for us
context.fillStyle = "black"; // set the context state to "black." Everything in canvas is drawn using this state. If you don't change it, then it will forever have these properties.
context.fillRect(x, y, 16, 16); // fill a rectangle with our x and y positions.
}
var canvas = document.getElementById("view");
var context = canvas.getContext("2d");
context.fillStyle = "black";
context.fillRect(0, 0, 32, 32);
var canvas = document.getElementById("view");
var context = canvas.getContext("2d");
@gmisail
gmisail / canvas.js
Last active December 11, 2016 16:56
/* Example A*/
/* HTML */
<canvas id='view' width=800 height=600></canvas>
/* JS */
var canvas = document.getElementById('view').getContext('2d');
/* Example B*/