Skip to content

Instantly share code, notes, and snippets.

View philals's full-sized avatar
🚚
Hi

Phil Alsford philals

🚚
Hi
View GitHub Profile
@bwhaley
bwhaley / gist:6471649
Last active July 22, 2019 23:40
Use this little script as EC2 User Data to install a Sumo Logic collector. Be sure to base64 encode it.
curl -o /tmp/sumo.sh https://collectors.sumologic.com/rest/download/linux/64
sh /tmp/sumo.sh -q -dir "/usr/local/SumoCollector"
/etc/init.d/collector stop
cat > /usr/local/SumoCollector/config/custom_sources.json << END
{
"api.version": "v1",
"sources": [
{
"sourceType": "LocalFile",
"name": "LocalAuth",
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active September 15, 2024 20:33
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

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.