Skip to content

Instantly share code, notes, and snippets.

View tivac's full-sized avatar
💭
👋🏻🙃

Pat Cavit tivac

💭
👋🏻🙃
View GitHub Profile
@tivac
tivac / machine.js
Created October 16, 2019 19:52
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
initial: 'run',
context: {},
states: {
run : {
invoke : {
id : "id",
src : () => new Promise((resolve) => {
setTimeout(() => resolve({
value : "VALUE",
@tivac
tivac / machine.js
Created October 11, 2019 00:21
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@tivac
tivac / README.md
Created November 6, 2018 05:17
modular-css issue #525
  1. npm install
  2. npm start
  3. Check ./dist folder, it should have a bundle.js and an assets/bundle-<hash>.css file. (Mine was bundle-d363bc08.css).
  4. Change index.js
  5. Check the ./dist/assets folder again. Has the css file changed its hash?
@tivac
tivac / styles.css
Last active May 30, 2017 18:08
Sane flowdock thread styling
@-moz-document url-prefix("https://www.flowdock.com/app") {
/* Non-threaded */
/* Hide the thread icons*/
.bubble-container .bubble-icon {
display: none;
}
/* Re-enable the left border */
.bubble-container .bubble {
@tivac
tivac / index.css
Created April 12, 2017 16:33
null created by tivac - https://repl.it/HHFC/2
Empty file
@tivac
tivac / mithril-xhr-example.markdown
Created April 11, 2017 06:21
Mithril XHR Example
@tivac
tivac / mithril-component-example.markdown
Created April 11, 2017 06:18
Mithril Component Example
@tivac
tivac / mithril-component-example.markdown
Last active April 11, 2017 06:16
Mithril Component Example
@tivac
tivac / script.js
Created April 11, 2017 06:11
Simple Mithril Example
var root = document.body
m.render(root, [
m("main", [
m("h1", {class: "title"}, "My first app"),
m("button", "A button"),
])
])
@tivac
tivac / serve.js
Last active December 15, 2015 21:28
Dumb static SPA server
"use strict";
var path = require("path"),
server = require("connect")(),
ecstatic = require("ecstatic")(process.cwd(), {
cache : 0,
handleError : false
});