Skip to content

Instantly share code, notes, and snippets.

View MajorBreakfast's full-sized avatar

Josef Brandl MajorBreakfast

View GitHub Profile
@MajorBreakfast
MajorBreakfast / README.md
Last active April 4, 2017 19:37
Change npm global install folder

How to change npm's global install folder

It can happen that npm install -g <package-name> reports an EPERM error. This means that npm isn't allowed to write to the directory without administrator rights. To fix this npm needs to be configured so that it uses a different folder.

Windows

1. Change npm config

npm config set prefix "%AppData%/npm"
@MajorBreakfast
MajorBreakfast / broccoli
Last active August 29, 2015 14:16
Analysis of Broccoli
# Strengths
- No leftover files
- Solved by passing temporary directories between plugins (i.e. tasks)
# Weaknesses
- No parallel plugin execution
- No parallel tasks: Independent tasks could execute in parallel
- No parallel builds: Can't decouple independent parts, e.g. unit tests from rest
- Code base issues
@MajorBreakfast
MajorBreakfast / api-errors.md
Last active August 29, 2015 13:56
API Errors

If a request fails the server SHOULD answer with an error which is stored in the "error" property. The simplest form ist just a string with the type of the error:

{
  "error": "csrfTokenInvalid"
}

Error types SHOULD be in camelCase starting with a lowercase letter and SHOULD NOT end with "Error".

The more elaborate form is providing an error object. Error objects MUST hold a "type" property with the type of the error:

@MajorBreakfast
MajorBreakfast / dasherized-filenames.md
Last active December 27, 2015 11:09
Dasherized file/foldernames