Skip to content

Instantly share code, notes, and snippets.

@z-vr
z-vr / upgrade.js
Created February 1, 2018 21:47
yarn upgrade all
// upgrade all dependencies
// requires `spawncommand`
// node upgrade.js
const spawncommand = require('spawncommand')
const { devDependencies, dependencies } = require('./package.json');
(async () => {
const keys = Object.keys({ ...devDependencies, ...dependencies })
@z-vr
z-vr / changelog.md
Last active January 11, 2018 16:44
Breaking changes for react-form from v1 to v2
  1. To display error automatically: Text -> StyledText
  2. Use getApi to ref the form to be able to submit from outside.
  3. Validation must explicitly return null to reset errors.
  4. postSubmit is not a function.
@z-vr
z-vr / vscode-nvm.md
Last active January 1, 2018 15:16
run vscode with custom version of node.js

To use VSCode debugger with a custom version of Node.js, we can use node.js bash script to run the correct version using nvm.

node.sh

#!/bin/bash

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

nvm run $*
@z-vr
z-vr / ignore.md
Created February 3, 2017 23:55 — forked from tmaybe/ignore.md
ignoring merge conflicts for specific files in a git repository

How to Ignore Merge Conflicts for Specific Files in a Git Repository

Create a directory and git init it

$ mkdir merge-test
$ cd merge-test/
$ git init

Keybase proof

I hereby claim:

  • I am z-vr on github.
  • I am anton_da (https://keybase.io/anton_da) on keybase.
  • I have a public key whose fingerprint is 0B5D 2B88 72BF 5593 3CA2 EEF2 5661 00D7 1426 8985

To claim this, I am signing this object: