Skip to content

Instantly share code, notes, and snippets.

View johnnydecimal's full-sized avatar

Johnny Noble johnnydecimal

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jen729w on github.
  • I am johnnynoble (https://keybase.io/johnnynoble) on keybase.
  • I have a public key whose fingerprint is 684F B318 E503 B156 DDC7 88D9 7E9E 3B6F 5DF3 E7F4

To claim this, I am signing this object:

@johnnydecimal
johnnydecimal / cjdfunction.sh
Created September 7, 2018 00:49
Bash function to jump to any Johnny.Decimal folder
# https://johnnydecimal.com
cjdfunction() {
pushd ~/Dropbox/*/*/${1}* # ~/Dropbox is my root folder, change to suit yours.
}
export cjdfunction
alias cjd='cjdfunction' # Or any other alias you prefer.
// I'll explain what Rebase is for later
import Rebase from 're-base';
// Note we import from 'firebase/app' not just 'firebase'. This avoids a nagging console
// warning ("It looks like you're using the development build of the Firebase JS SDK.")
import firebase from 'firebase/app';
// Similarly, on line 15 we need the database module, so that's exactly what we specify here.
require('firebase/database');
@johnnydecimal
johnnydecimal / SketchSystems.spec
Last active March 1, 2019 04:44
Add or Edit an Area
Add or Edit an Area
Start - blank fields - Return & button are disabled
user types a character -> checkInput running
Start*
No error shown - Return & button are enabled
user types a character or presses Return or button -> checkInput running
checkInput running
number is blank -> Number is blank
number is a duplicate -> Number is a duplicate
number is badly formatted -> Number is badly formatted
@johnnydecimal
johnnydecimal / machine.js
Last active December 15, 2019 02:41
Generated by XState Viz: https://xstate.js.org/viz
// v1.2.0 2019-12-15
const engineRoom = Machine({
id: 'application',
type: 'parallel',
states: {
Application: {
initial: 'start',
@johnnydecimal
johnnydecimal / machine.js
Last active January 23, 2020 02:33
Generated by XState Viz: https://xstate.js.org/viz
// Working version, i.e. not v1.2.0
// Updated 2020-01-23 11:14
// This is the plain-JS version for easy copy/pasting & linter
// formatting. Copy back to 22.14.md for publishing.
// https://xstate.js.org/viz/?gist=e22371fb0c8da1521f5e2873076395cb
const engineRoom = Machine({
id: "application",

JD file spec

How do you store JD data in exportable plain-text?

What's legal?

000 Project
-----------       // Optional, semantically ignored.
10-19 Area
@johnnydecimal
johnnydecimal / machine.js
Last active March 23, 2020 09:13
Generated by XState Viz: https://xstate.js.org/viz
// Linked to play.jd.com.
// Do not delete or edit.
const jdLanguage = Machine({
id: 'jdLanguage',
initial: 'start',
states: {
start: {
on: {
FIND_AREA: 'area_detected',
// Linked to play.jd.com.
// Do not delete or edit.
const jdLanguage = Machine({
id: 'jdLanguage',
initial: 'start',
states: {
start: {
on: {
FIND_AREA: 'area_detected',
// Linked to play.jd.com.
// Do not delete or edit.
const jdLanguage = Machine({
id: 'jdLanguage',
initial: 'start',
states: {
start: {
on: {
FIND_AREA: 'area_detected',