Skip to content

Instantly share code, notes, and snippets.

"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Funk.aiff"
}
]
}
@areai51
areai51 / machine.js
Created September 2, 2020 13:53
Generated by XState Viz: https://xstate.js.org/viz
const fileMachine = Machine({
id: 'file',
type: 'parallel',
states: {
upload: {
initial: 'idle',
states: {
idle: {
on: {
INIT_UPLOAD: 'pending'
@areai51
areai51 / machine.js
Created September 2, 2020 13:53
Generated by XState Viz: https://xstate.js.org/viz
const pedestrianStates = {
initial: 'walk',
states: {
walk: {
on: {
PED_COUNTDOWN: 'wait'
}
},
wait: {
on: {
@areai51
areai51 / machine.js
Created September 2, 2020 13:52
Generated by XState Viz: https://xstate.js.org/viz
const pedestrianStates = {
initial: 'walk',
states: {
walk: {
on: {
PED_COUNTDOWN: 'wait'
}
},
wait: {
on: {
@areai51
areai51 / machine.js
Last active August 29, 2020 11:25
Generated by XState Viz: https://xstate.js.org/viz
const lightMachine = Machine({
// not a parallel machine
id: 'light',
initial: 'green',
states: {
green: {
on: { TIMER: 'yellow' }
},
yellow: {
on: { TIMER: 'red' }
var path = require('path');
var PACKAGE = require('./package.json');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var isProd = process.env.NODE_ENV !== 'dev';
var externals = {};
if (isProd) {
externals = {
react: 'react',
'react-dom': 'reactDOM',
emotion: '@emotion/core',
const path = require('path');
const fetchTemplateFs = require('node-tailor/lib/fetch-template');
const ACCEPT_HEADERS = [
'accept-language',
'referer',
'user-agent',
'x-request-uri',
'x-request-host',
'cookie',
const express = require('express');
const helment = require('helmet');
const Tailor = require('node-tailor');
const { fetchTemplate, filterRequestHeaders } = require('./middleware/tailor');
const tailor = new Tailor({
fetchTemplate,
filterRequestHeaders,
});
import React, { PropTypes } from 'react';
import styles from './Button.css';
const Button = (props) => {
return (
<button
type="button"
onClick={props.onClick}
className={styles.primary}
>
// Go to menue:
// find->find in files
// Switch on reg_ex button
// Find:
^(.*)$
// Where:
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/*
// Then click on the find button
// Be careful to not click on Replace!!!