Skip to content

Instantly share code, notes, and snippets.

View Jayphen's full-sized avatar
🏠
Working from home

Jayphen Jayphen

🏠
Working from home
View GitHub Profile
@Jayphen
Jayphen / always allow
Created May 25, 2015 23:53
Spam always allow when Chrome loses access to keychain
tell application "System Events"
repeat while exists (processes where name is "SecurityAgent")
repeat until exists window 1 of process "SecurityAgent"
end repeat
tell process "SecurityAgent"
click button "Always Allow" of window 1
end tell
end repeat
end tell
@Jayphen
Jayphen / Breakpoints.js
Last active February 13, 2018 08:53
A wrapper around react-responsive to simplify breakpoint use
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import MediaQuery from 'react-responsive';
import {
labels,
getBreakpointValue,
getMaxBreakpointValue,
getNextBreakpoint
} from '../../util/breakpoints';
@Jayphen
Jayphen / settings.json
Last active March 12, 2019 12:40
ESlint/autosave VSCode settings
{
"prettier.eslintIntegration": true,
"editor.formatOnSave": true,
"eslint.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
],
@Jayphen
Jayphen / machine.js
Last active January 6, 2020 16:08
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Jayphen
Jayphen / machine.js
Last active February 14, 2020 13:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Jayphen
Jayphen / neovim-plugins-for-js-ts.vimrc
Last active February 5, 2020 18:12
Vim/Neovim plugins for working with JavaScript, TypeScript, React, GraphQL, Markdown
call plug#begin('~/.config/nvim/plugged')
" Navigating files
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim' " fuzzy finder, like cmd-P in VSCode
Plug 'rbgrouleff/bclose.vim' " dependency for ranger
Plug 'francoiscabrol/ranger.vim' " file browser using vim keybindings
" tmux integration
Plug 'christoomey/vim-tmux-navigator' " move between vim and tmux
@Jayphen
Jayphen / machine.js
Last active February 6, 2020 13:25
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Jayphen
Jayphen / machine.js
Created February 13, 2020 10:16
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@Jayphen
Jayphen / SketchSystems.spec
Created February 17, 2020 17:58 — forked from flowt-au/SketchSystems.spec
# "Messages" in this example are synonymous with "events" and "listeners"
# "Messages" in this example are synonymous with "events" and "listeners"
Context menu
Hidden
a show yourself message is received -> Showing
Showing
a menu item is clicked -> Emit message
loss of focus is detected -> Hidden
# Send message indicating that menuitem X was clicked
Emit message
@Jayphen
Jayphen / machine.js
Last active February 19, 2020 22:12
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions