Skip to content

Instantly share code, notes, and snippets.

Vaughan Rouesnel vjpr

Block or report user

Report or block vjpr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zkochan / .md
Last active Jun 13, 2019
filtering in pnpm vs lerna
View .md
Lerna v3.2 pnpm v2.15
--scope my-component -- my-component
--scope toolbar-* -- toolbar-*
--scope my-component --include-filtered-dependencies -- my-component...
--scope my-component --include-filtered-dependents --
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active Oct 31, 2019
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:ebaca117ac9e44231421f04e7796d5ca
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
iddan / convert-json5.js
Created Feb 26, 2017
Convert JSON5 to JSON
View convert-json5.js
const fs = require('fs');
const JSON5 = require('json5');
const [file] = process.argv.slice(2);
file.replace(/\.json5$/, '.json'),
JSON5.parse( fs.readFileSync(file) ),
todd-dsm / git-submodule-untracked-content
Created Jan 17, 2017
how to solve the "untracked content" / "modified content" message?
View git-submodule-untracked-content
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: .gitmodules
modified: vim/after/ftplugin/json.vim
new file: vim/bundle/Dockerfile
new file: vim/bundle/ansible-vim
peterjaap / iterm_open_with
Created Dec 15, 2016
Open text files from Iterm2 in PhpStorm by command+clicking on it
View iterm_open_with
# Open text files from Iterm2 in PhpStorm by command+clicking on it
# You will need the Remote call plugin in PhpStorm -
# And of course curl
# wget this and chmod +x it
# then move it to somwhere convenient in your path (such as /usr/local/bin)
# With respects to for the basis for this
# iterm_open_with - open a URL, file from CWD, full path, or path with linenumber in default app or PhpStorm if text file
- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.
brew tap homebrew/versions
brew install lua53
## Don't remember now whether local works, possibly need to install via sudo
luarocks-5.3 install --local set
# sudo luarocks-5.3 install set
acdlite / app.js
Last active Nov 17, 2019
Quick and dirty code splitting with React Router v4
View app.js
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
Rich-Harris /
Last active Nov 18, 2019
Top-level `await` is a footgun

Edit — February 2019

This gist had a far larger impact than I imagined it would, and apparently people are still finding it, so a quick update:

  • TC39 is currently moving forward with a slightly different version of TLA, referred to as 'variant B', in which a module with TLA doesn't block sibling execution. This vastly reduces the danger of parallelizable work happening in serial and thereby delaying startup, which was the concern that motivated me to write this gist
  • In the wild, we're seeing (async main(){...}()) as a substitute for TLA. This completely eliminates the blocking problem (yay!) but it's less powerful, and harder to statically analyse (boo). In other words the lack of TLA is causing real problems
  • Therefore, a version of TLA that solves the original issue is a valuable addition to the language, and I'm in full support of the current proposal, which you can read here.

I'll leave the rest of this document unedited, for archaeological

nolanlawson /
Last active Sep 19, 2019
Why we dropped Lerna from PouchDB

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).


You can’t perform that action at this time.