Skip to content

Instantly share code, notes, and snippets.

View hiddenboox's full-sized avatar
🎯
Focusing

Sebastian Sobociński hiddenboox

🎯
Focusing
View GitHub Profile
@hiddenboox
hiddenboox / machine.js
Last active September 2, 2020 14:00
Generated by XState Viz: https://xstate.js.org/viz
const Auth = {
signIn: () => Promise.resolve(({ challangeName: "test"}))
}
const formMachine = {
initial: "idle",
states: {
idle: {
on: {
SUBMIT: "loading",
},
// move to main.js
define(['utils/array', 'react'], function (array, React) {
React.render();
});
// move to index.js
const rollup = require('rollup');
const amd = require('rollup-plugin-amd');
const fs = require('fs');
@hiddenboox
hiddenboox / html5-video-streamer.js
Created November 24, 2016 11:34 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';