Skip to content

Instantly share code, notes, and snippets.

View bnb's full-sized avatar

Tierney Cyren bnb

View GitHub Profile
@bnb
bnb / rip.js
Last active July 30, 2020 14:29
rip
const ghUserEvents = require('gh-user-events');
var watches = 0;
var comments = 0;
var pushes = 0;
var prs = 0;
var createRepos = 0;
var deleteRepos = 0;
var reviews = 0;
var issues = 0;

npm ls commands

  • npm ls # list all modules in node_modules
    • lists all modules
  • npm ls --depth=0 # list all direct deps and devDeps
    • lists all modules that are direct dependencies (0 levels deep in the dependency tree)
  • npm ls <module> # list all trees that include <module>
    • lets you filter for a specific module
  • npm ls --prod # only show production modules + their deps
    • lets you filter for only production dependencies (dependencies in the dependencies property of package.json)
  • npm ls --prod --depth=0 # only show direct prod deps

bad practice

sudo npm i -g <module>

good practice

npm config set prefix 
  • each week focus on a single working group, initiative or team
    • tweet out their repo and name them
    • point out some of the things they're currently working on / open to having help on
  • have the wg/initiative/team open an issue offering to help onboard folks

commands

  • npm init -y
  • npm install react@npm:preact@8
  • npm outdated
  • npm install react@npm:preact@latest
  • npm outdated
  • cat package.json

package.json

commands

  • npm init -y
  • npm install react@npm:preact@8
  • npm outdated
  • npm install react@npm:preact@latest
  • npm outdated
  • cat package.json

package.json

defaults:

  • npm config set init-author-name ""
  • npm config set init-author-url ""
  • npm config set init-author-email ""
  • npm config set init-license "ISC"
  • npm config set init-version "1.0.0"

custom (example)

  • npm config set init-author-name "Tierney Cyren"
  • npm config set init-author-url "https://bnb.im"
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/home/bnb/.nvm/versions/node/v14.4.0/bin/node',
1 verbose cli '/home/bnb/.nvm/versions/node/v14.4.0/bin/npm',
1 verbose cli 'install'
1 verbose cli ]
2 info using npm@6.14.5
3 info using node@v14.4.0
4 verbose npm-session 3b025512bca24198
5 silly install runPreinstallTopLevelLifecycles
  • roadmapping for Node.js
  • meet GitHub Action updates
    • figure out node_modules bundling for PRs
  • normal issue maintenance in CommComm / examples
  • extract version diffing from nodev into a module
  • Build GitHub Actions
    • "new PR" label Action
    • voting via 👍 and 👎 reactions
  • prerequisites.dev
  • esminnodejs.com
@bnb
bnb / alt-arrow-for-terminal-switching.default.json
Created May 15, 2020 22:42
VS Code's default keybinds for switching between open terminals (Windows, maybe cross-platform!)
{ "key": "alt+down", "command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus" },
{ "key": "alt+right", "command": "workbench.action.terminal.focusNextPane",
"when": "terminalFocus" },
{ "key": "alt+up", "command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus" },
{ "key": "alt+left", "command": "workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus" },