Given I am in PC mode
When I press program => keypad => F1 => keypad => Home
Then I will have mapped the Home key as the Meta key for a Linux PC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extract the desired values from a union of objects | |
type ExtractUnionValues<T extends {}, ExcludProps extends string = never> = T extends Extract<T, { [K in infer P]: any }> ? T[Exclude<P, ExcludProps>] : never | |
type PickUnionValues<T extends {}, Props extends string = never> = T extends Extract<T, { [K in infer P]: any }> ? T[Extract<P, Props>] : never | |
// alternative implementation | |
type ExtractUnionValues<T extends {}, ExcludedProps extends string = never> = T extends {} ? Omit<T, ExcludedProps>[keyof Omit<T, ExcludedProps>]: never | |
type PickUnionValues<T extends {}, Props extends string = never> = T extends {} ? Pick<T, Extract<keyof T, Props>>[keyof Pick<T, Extract<keyof T, Props>>]: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, | |
"skipLibCheck": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# after/syntax/typescript.vim | |
# after/syntax/typescriptreact.vim | |
set conceallevel=1 | |
syntax keyword typescriptPredefinedType any conceal cchar=💩 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# This script lints files for a Husky pre-commit hook | |
# | |
# run with `git commit -m "foo" 2>&1 | tee husky-errors.ignore.txt` | |
# to save the errors to a file. | |
# | |
# { | |
# "hooks": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function SaveSession() | |
let session_dir = $HOME . "/.vimsessions/" | |
let session_file = "dir" . substitute(getcwd(), '/', '_', 'g') | |
if v:this_session | |
execute "mks! " . v:this_session | |
echo "saved " . v:this_session | |
return 0 | |
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* Editor */ | |
"editor.fontLigatures": true, | |
"editor.fontFamily": "'FiraCode-Retina'", | |
"editor.formatOnSave": true, | |
"editor.fontSize": 14, | |
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": [ |
NewerOlder