Skip to content

Instantly share code, notes, and snippets.

View imechemi's full-sized avatar

Tenzin Chemi imechemi

  • Apollo.io
  • India
  • 18:18 (UTC +05:30)
View GitHub Profile
@imechemi
imechemi / fix-homebrew-npm.md
Created October 9, 2015 05:41 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g
@imechemi
imechemi / gist:87a46eb8547762ba7738
Last active August 29, 2015 14:27 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does
import hudson.model.*;
import hudson.util.*;
import jenkins.model.*;
import hudson.FilePath.FileCallable;
import hudson.slaves.OfflineCause;
import hudson.node_monitors.*;
for (node in Jenkins.instance.nodes) {