Skip to content

Instantly share code, notes, and snippets.

Robert Raiford rob3c

View GitHub Profile
@rob3c
rob3c / typescript-pattern-matching.ts
Created Nov 10, 2016
TypeScript pattern matching proof-of-concept
View typescript-pattern-matching.ts
// preserved from my comment in this issue: https://github.com/Microsoft/TypeScript/issues/165#issuecomment-259598080
interface Type<T> { new(...args): T }
interface CaseResult<R> {
success: boolean;
result: R;
}
interface CaseFn<R> { (value: any): CaseResult<R> }
@rob3c
rob3c / ngrx-remote-devtools-proxy-instructions.md
Last active Nov 16, 2018
Using @ngrx/store-devtools remotely with Ionic 2
View ngrx-remote-devtools-proxy-instructions.md

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 https://github.com/ngrx/store-devtools/issues/33 and https://github.com/ngrx/store-devtools/issues/31), but at least the Inspector, Log Monitor and Graph is working remotely. Here's how:

First, add https://github.com/zalmoxisus/remotedev 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.

remote-devtools-proxy.ts

@rob3c
rob3c / vscode_keybindings.json
Created Aug 29, 2016
Visual Studio Code (vscode) custom key bindings
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",
@rob3c
rob3c / vscode_settings.json
Last active Sep 8, 2016
Visual Studio Code (vscode) Custom Settings
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",
@rob3c
rob3c / karabiner_private.xml
Last active Aug 29, 2016
Karabiner config
View karabiner_private.xml
<?xml version="1.0"?>
<!-- https://gist.github.com/rob3c/a632bb583eff74b2c6923b91f2a0d385 -->
<root>
<appdef>
<appname>PARALLELS</appname>
<equal>com.parallels.desktop.console</equal>
</appdef>
<devicevendordef>
<vendorname>MACALLY</vendorname>
@rob3c
rob3c / .cvimrc
Last active Nov 10, 2017
cVim settings
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.