-
Map
caps_lock
tohyper
key -
Map
left_command+caps_lock
tocaps_lock
-
WOW gameplay support: switch
left_command
andleft_option
keys -
Ducky One 3 support
Tested with Karabiner-Elements 14.3.0 under macOS 12.2.1
// Simple implementation of lodash.get | |
// Handles arrays, objects, and any nested combination of the two. | |
// Also handles undefined as a valid value - see test case for details. | |
// Based on: https://gist.github.com/harish2704/d0ee530e6ee75bad6fd30c98e5ad9dab | |
export function deepGet(obj, query, defaultVal) { | |
query = Array.isArray(query) ? query : query.replace(/(\[(\d)\])/g, '.$2').replace(/^\./, '').split('.'); | |
if (!(query[0] in obj)) { | |
return defaultVal; | |
} | |
obj = obj[query[0]]; |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { InputGroup as BPInputGroup } from '@blueprintjs/core'; | |
import useDebounceInput from './useDebounceInput'; | |
const InputGroup = ({ value, onChange, debounceWait, ...restProps }) => { | |
const debounce = useDebounceInput({ | |
value, |
hs.application.enableSpotlightForNameSearches(true) | |
hyperKeys = {'cmd', 'alt', 'ctrl', 'shift'} | |
function bindHyperFocus(shortcutKey, findApplication) | |
hs.hotkey.bind(hyperKeys, shortcutKey, function() | |
-- hs.application.find(findApplication):activate() | |
hs.application.launchOrFocus(findApplication) | |
end) | |
end |
/** | |
* @param config {object} environment config object | |
* | |
* { | |
* [serviceName]: { | |
* [key]: "{value}", | |
* ... | |
* }, | |
* ... | |
* } |
function gen(config) { | |
let list = []; | |
for(let [serviceName, serviceObject] of Object.entries(config)) { | |
for (let [key, value] of Object.entries(serviceObject)) { | |
// console.log(`${name}.${key} = ${value}`) | |
list.push(`${serviceName}.${key}="${value}"`); | |
} | |
} | |
return `firebase functions:config:set ${list.join(" ")}`; | |
} |
import React, { useMemo, useCallback } from 'react'; | |
import PropTypes from 'prop-types'; | |
import _ from 'lodash'; | |
import { FastField as BaseFastField } from 'formik'; | |
const nameShouldUpdate = (nextFormik, formik, name) => { | |
return ( | |
_.get(formik.values, name) !== _.get(nextFormik.values, name) || |
/* eslint no-console: 0 */ | |
import _ from 'lodash'; | |
import { diff } from 'deep-object-diff'; | |
import { shouldUpdate } from 'recompose'; | |
export default function debugUpdate(groupLabel, collapsed = true) { | |
if (typeof groupLabel === 'undefined') { | |
throw new Error('Should provide `groupLabel`.'); | |
} |
#3366CC | |
#DC3912 | |
#FF9900 | |
#109618 | |
#990099 | |
#3B3EAC | |
#0099C6 | |
#DD4477 | |
#66AA00 | |
#B82E2E |