Skip to content

Instantly share code, notes, and snippets.

View Masquerade-Circus's full-sized avatar

Christian César Robledo López Masquerade-Circus

View GitHub Profile
@Masquerade-Circus
Masquerade-Circus / machine.js
Last active August 16, 2020 20:04
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Masquerade-Circus
Masquerade-Circus / getRoutes.js
Last active December 3, 2019 22:01
Log all express routes including those on sub routers.
import express from 'express';
let App = express(),
app_port = process.env.app_port || 11337,
app_host = process.env.app_host || '127.0.0.1';
App.listen(app_port, () => {
console.log(`Server app running on http://${app_host}:${app_port}`);
});
@Masquerade-Circus
Masquerade-Circus / readme.md
Last active August 26, 2016 19:48
sessionManager - sessionStorage/localStorage manager - Stores and retrive data from objects

#sessionManager // Stores and retrive data from objects like an orm style

window.session = sessionManager(sessionStorage,'reserva','-', reserva);

console.log(session()); // Get the main data object

session('hello-world','hola mundo') // sets the value of {hello:{world: 'hola mundo'}} its the same as reserva.hello.world = 'hola mundo'

console.log(session('hello-world')) // returns 'hola mundo' and its the same as reserva.hello.world
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE