Skip to content

Instantly share code, notes, and snippets.

View rtorr's full-sized avatar

Richard Torruellas rtorr

View GitHub Profile
@rtorr
rtorr / keybindings.json
Created April 10, 2020 16:27
vscode configuration
[
{
"key": "cmd+\\ cmd+\\",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+2",
"command": "workbench.action.focusSideBar"
},
{
@rtorr
rtorr / yarn.sh
Created March 11, 2020 18:42
make yarn not suck
NODE_OPTIONS="--max-old-space-size=8192" yarn --network-timeout 100000
@rtorr
rtorr / values.js
Last active December 29, 2019 18:36
How I think about default values in JavaScript
/**
* How I think about default values in JavaScript
*
* First of all, all these things can fall under the Opinions, Concerns, and Nitpick
* umbrella. The most important thing is just giving thought to the things
* you have opinions about and always reserve the right to be corrected.
*
* My simple rule of thumb is to try to set initial state to whatever the
* eventual state will be for Objects and Arrays.
*
@rtorr
rtorr / *lit-html + unistore.md
Created January 29, 2018 15:29 — forked from developit/*lit-html + unistore.md
unistore + lit-html

lit-html + unistore

import { html, render } from 'lit'
import { provide, connect } from './unlit'

const app = provide(store)( () => html`<div>${counter}</div>` )

const counter = connect('count', {
@rtorr
rtorr / javascropt.json
Created August 11, 2017 18:33
Ember vscode snippets
{
"didInsertElement": {
"prefix": "didInsertEl",
"body": ["didInsertElement(...args){", "\tthis._super(args);", "\t$0", "}"]
},
"init": {
"prefix": "init",
"body": ["init(...args){", "\tthis._super(args);", "\t$0", "}"]
},
"didReceiveAttrs": {
{
"presets": [
"babili"
],
"plugins": [
[
"transform-react-jsx",
{
"pragma": "h" // default pragma is React.createElement
}
@rtorr
rtorr / keybindings.json
Last active January 3, 2018 06:20
mac to windows vscode keymap
[
{
"key": "alt+\\ alt+\\",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "cmd+2",
"command": "workbench.action.focusSideBar"
},
{
@rtorr
rtorr / Hello.re
Created September 7, 2016 22:17
Watch reason files and build for browser.
let bar a b => a + b;
let b = bar 1 2;
let baz a b => bar a b;
let b2 = baz 1 2;
Js.log (b, b2);
@rtorr
rtorr / keymap.cson
Last active June 16, 2016 17:28
Atom keybindings
'atom-workspace':
'ctrl-v': 'pane:split-right-and-copy-active-item'
'ctrl-w': 'window:focus-next-pane'
'.platform-darwin atom-text-editor':
'cmd-e':'nuclide-quick-open:find-anything-via-omni-search'
'.platform-darwin atom-workspace':
'cmd-1': 'nuclide-side-bar:toggle'
@rtorr
rtorr / keybindings.json
Last active June 14, 2016 19:34
vscode keybindings for ubuntu to feel more likes OSX's keybindings
[
{
"key": "ctrl+1 ctrl+1",
"command": "workbench.action.toggleSidebarVisibility"
},
{
"key": "alt+/",
"command": "editor.action.commentLine",
"when": "editorTextFocus"
},