Skip to content

Instantly share code, notes, and snippets.

View ArthurYidi's full-sized avatar

Arthur Yidi ArthurYidi

  • San Francisco, California
View GitHub Profile
const fetchMachine = Machine({
id: 'Inbound Call',
initial: 'Connected',
states: {
Connected: {
on: {
failed: 'TourAdded',
hasTour: 'LeadAdded',
}
},
const fetchMachine = Machine({
id: 'Inbound Call',
initial: 'Connected',
states: {
FA_Ready: {
on: {
failed: 'loading',
hasTour: 'LeadAdded',
}
},
@ArthurYidi
ArthurYidi / machine.js
Last active July 24, 2019 18:34
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'Outbound Call',
initial: 'Connected',
states: {
Connected: {
on: {
failed: 'loading',
hasTour: 'LeadAdded',
}
},
@echo off
echo.
echo Remote Desktop will be temporarily disconnected . . . please reconnect after a few seconds.
echo.
pause
@echo on
REM The active session has an arrow as the first character
setlocal EnableDelayedExpansion
FOR /F %%A in ('qwinsta') do (
set tempSessionName=%%A
{"errors":[],"warnings":[],"version":"3.8.1","hash":"ddcaf14ea512b35750b7","publicPath":"/","assetsByChunkName":{"main":["static/js/main.3345fe29.js","static/js/main.3345fe29.js.map"]},"assets":[{"name":"static/js/main.3345fe29.js","size":175848,"chunks":[0],"chunkNames":["main"]},{"name":"static/js/main.3345fe29.js.map","size":808166,"chunks":[0],"chunkNames":["main"]},{"name":"index.html","size":245,"chunks":[],"chunkNames":[],"emitted":true},{"name":"asset-manifest.json","size":96,"chunks":[],"chunkNames":[],"emitted":true},{"name":"stats-bundlesize.json","size":0,"chunks":[],"chunkNames":[]}],"filteredAssets":0,"entrypoints":{"main":{"chunks":[0],"assets":["static/js/main.3345fe29.js","static/js/main.3345fe29.js.map"]}},"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":269258,"names":["main"],"files":["static/js/main.3345fe29.js","static/js/main.3345fe29.js.map"],"hash":"3345fe29cf3d9a8c4337","parents":[],"modules":[{"id":0,"identifier":"/Users/arthur/Downloads/sandbo
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Webpack Bundle Analyzer</title>
<!-- viewer.js -->
<script>
@ArthurYidi
ArthurYidi / detectFontChange.js
Created July 23, 2018 16:15
Detect Dynamic Font Size Changed
document.addEventListener('visibilitychange', function() {
if (document.visibilityState === 'visible') {
document.querySelector(':root').style.font = '-apple-system-body';
let fontSize = getComputedStyle(document.body).getPropertyValue('font-size');
console.log(fontSize);
}
});
@ArthurYidi
ArthurYidi / fonts.js
Created July 23, 2018 16:04
Body Font Size to Dynamic Type
const bodyFontToDynamicTypeSize = {
"14px": "xSmall",
"15px": "Small",
"16px": "Medium",
"17px": "Large",
"19px": "xLarge",
"21px": "xxLarge",
"23px": "xxxLarge",
"28px": "AX1",
"33px": "AX2",
@ArthurYidi
ArthurYidi / fonts.js
Created July 23, 2018 16:02
Body Font Sizes for Dynamic Type
const bodyFontToDynamicTypeSize = {
"14px": "xSmall",
"15px": "Small",
"16px": "Medium",
"17px": "Large",
"19px": "xLarge",
"21px": "xxLarge",
"23px": "xxxLarge",
"28px": "AX1",
"33px": "AX2",
#!/usr/bin/env python3
from subprocess import check_output, CalledProcessError
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("port", help="Port Number")
parser.add_argument("-n", "--dry-run", action="store_false", help="run without killing processes")
args = parser.parse_args()
# lsof