Skip to content

Instantly share code, notes, and snippets.

View motyar's full-sized avatar
🟢
I may be slow to respond.

Motyar motyar

🟢
I may be slow to respond.
View GitHub Profile
@motyar
motyar / p5js-mp4-export-1.html
Created March 29, 2022 09:31 — forked from erraticgenerator/p5js-mp4-export-1.html
Video export from p5.js sketch 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://unpkg.com/h264-mp4-encoder/embuild/dist/h264-mp4-encoder.web.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@1.1.9/lib/p5.js"></script>
<style>
html { font-family: sans-serif; font-size: 12px; }
@motyar
motyar / index.html
Last active June 11, 2020 06:09 — forked from tonyfast/index.html
A simple example that dynamically adds slides to a Reveal.js
<head>
<link rel="stylesheet" href="//cdn.jsdelivr.net/g/reveal.js(css/reveal.min.css)">
<script src="//cdn.jsdelivr.net/g/reveal.js,zepto"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-markdown data-separator-vertical="^===" data-separator="^---">
<script type="text/template" id="md"></script>
@motyar
motyar / 1456800856.csv
Last active March 1, 2016 03:04 — forked from anonymous/1456800856.csv
Another gist
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 14 columns, instead of 10. in line 5.
Name,"Street Address",City,State,"Zip code",Phone,Website,Rating,Reviews,"Merchant Verified","Zagat Score",Lat,Lon,"Listing URL"
"Cesare Bistro","1126 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9824 8126",,,,,,-37.8518021,145.0305495,https://maps.google.com/?cid=331980050335729601
"The Feed Bag Cafe","1129 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 2147",,,2,,,-37.8515806,145.0303308,https://maps.google.com/?cid=9348602243163246040
"Ionsky's Bakehouse Cafe","1125 Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 1618",,,4,,,-37.851526,145.030218,https://maps.google.com/?cid=2678506672615980113
"Coles Express Glenvern","Malvern Rd, Malvern VIC 3144, Australia",,Victoria,3144,"+61 3 9822 1481",http://www.colesexpress.com.au/,,1,,,-37.851869,145.02967,https://maps.google.com/?cid=11935115476390218234
"The Malvern Hotel","Malvern Rd &amp; Glenferrie Rd, Toorak VIC 3144, Australia",,Victoria,3144,"+61 3 9822 3582",http://www.themalvern.com/contact,,3,
@motyar
motyar / main.go
Last active November 13, 2015 21:09 — forked from maxmcd/main.go
Gitbaotest
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
http.HandleFunc("/",
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>
@motyar
motyar / livestream
Created August 28, 2014 11:28 — forked from deandob/livestream
// Live video stream management for HTML5 video. Uses FFMPEG to connect to H.264 camera stream,
// Camera stream is remuxed to a MP4 stream for HTML5 video compatibility and segments are recorded for later playback
var liveStream = function (req, resp) { // handle each client request by instantiating a new FFMPEG instance
// For live streaming, create a fragmented MP4 file with empty moov (no seeking possible).
var reqUrl = url.parse(req.url, true)
var cameraName = typeof reqUrl.pathname === "string" ? reqUrl.pathname.substring(1) : undefined;
if (cameraName) {
try {
cameraName = decodeURIComponent(cameraName);