Skip to content

Instantly share code, notes, and snippets.

View oscargm's full-sized avatar

Óscar Garcia oscargm

View GitHub Profile
@oscargm
oscargm / machine.js
Last active April 30, 2021 11:02
Generated by XState Viz: https://xstate.js.org/viz
const initialContext = {
selectedValue: -1,
availableValues: [
{ id: 1, text: "value 1" },
{ id: 2, text: "value 2" },
{ id: 3, text: "value 3" },
{ id: 4, text: "value 4" },
],
};
@oscargm
oscargm / lv-premium-content.md
Last active December 1, 2020 17:03
LaVanguardia Premium Content

Access to La Vanguardia exclusive content

Enter into La Vanguardia, select any exclusive content new and execute the following script.

(() => {
    ['ev-modals', 'modal-open'].forEach(className => {
        document.body.classList.remove(className);
    });
 $('.*REQUIRE_LOGIN').style.display = 'none !important';
@oscargm
oscargm / machine.js
Created June 12, 2020 07:34
Generated by XState Viz: https://xstate.js.org/viz
const resizableBoxMachine = Machine({
id: 'resizable-box',
initial: 'restored',
states: {
restored: {
on: {
MINIMIZE: {
target: 'minimized',
actions: 'minimize',
@oscargm
oscargm / machine.js
Last active December 3, 2019 10:20
Generated by XState Viz: https://xstate.js.org/viz
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)