Skip to content

Instantly share code, notes, and snippets.

Ewen Mackenzie fanky10

Block or report user

Report or block fanky10

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
@adriangl
adriangl / pre-commit
Created Nov 23, 2016
Git pre-commit script for running Checkstyle in all Android-Studio based project files
View pre-commit
#!/bin/sh
#Define paths where the checkstyle file is and where to check for style inconsistencies
CHECKSTYLE_PATH="checkstyle.xml"
CHECKSTYLE_FOLDERS_TO_CHECK="app/src/main/java app/src/androidTest/java app/src/test/java"
#Check if the 'checkstyle' command is installed
#Magic: http://stackoverflow.com/a/677212
command -v checkstyle >/dev/null 2>&1 || { echo >&2 "checkstyle is not installed, aborting.\nInstall it using brew or apt-get"; exit 1; }
#Run checkstyle over our files
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active Aug 16, 2019
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew
View fix-homebrew-npm.md

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.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

You can’t perform that action at this time.