Instantly share code, notes, and snippets.

View typescript-pattern-matching.ts
// preserved from my comment in this issue:
interface Type<T> { new(...args): T }
interface CaseResult<R> {
success: boolean;
result: R;
interface CaseFn<R> { (value: any): CaseResult<R> }

Ok, I have on-device remote store debugging working with Ionic 2. Unfortunately, time-travel and state import doesn't work with store-devtools yet (see and, but at least the Inspector, Log Monitor and Graph is working remotely. Here's how:

First, add to the project:

> npm install --save-dev remotedev

Then add these devtools proxy wrapper classes to the project. They provide the same interface as the browser extension so store-devtools will think it's just talking to the chrome extension. I left in the trace debug logging so you can clearly see what's happening in the console, but it's easy to remove if you want.


View vscode_keybindings.json
// Place your key bindings in this file to overwrite the defaults
{ "key": "ctrl+k f", "command": "" }, // avoid accident hitting f instead of h
{ "key": "ctrl+k h", "command": "workbench.action.moveActiveEditorLeft" },
{ "key": "ctrl+k l", "command": "workbench.action.moveActiveEditorRight" },
{ "key": "ctrl+w", "command": "" }, // disable
{ "key": "ctrl+numpad_add", "command": "editor.unfold",
"when": "editorFocus" },
{ "key": "ctrl+numpad_subtract", "command": "editor.fold",
View vscode_settings.json
// Place your settings in this file to overwrite the default settings
//-------- Editor configuration --------
"editor.detectIndentation": false,
"editor.fontSize": 12,
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.wrappingColumn": 93,
"editor.wrappingIndent": "none",
View karabiner_private.xml
<?xml version="1.0"?>
<!-- -->
View .cvimrc
let blacklists = ["http://localhost/*"]
set autoupdategist
set numerichints
set typelinkhints
map b :buffer<Space>
map d closeTab
map D :exec dJ<CR>
map F createActiveTabbedHint