Skip to content

Instantly share code, notes, and snippets.

@douglas-mason
douglas-mason / app.js
Created September 15, 2017 15:02
callback example
const app = {
get: (route, cb) => {
console.log('sending user to this route:' + route);
const req = {
user: 'Doug'
};
const res = {
author: 'Annie',
sendData: (data) => {
console.log('sending this data -> ' + JSON.stringify(data))
@rcugut
rcugut / node-npm-install.md
Last active October 10, 2025 20:15 — forked from DanHerbert/fix-homebrew-npm.md
Install node & npm on Mac OS X with Homebrew

DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

@CoolOppo
CoolOppo / Vim Commands Cheat Sheet.md
Created February 5, 2014 20:47
Vim Commands Cheat Sheet

Source

Vim Commands Cheat Sheet


How to Exit

:q[uit]