Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block mhawila

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
mhawila / angular1-jsonp.js
Last active Jan 23, 2017
Using $http.jsonp to bypass browser's CORS policy.
View angular1-jsonp.js
(function() {
'use strict';
// This is how you would do it using angular 1 & http service
var app = angular.module('your.module', []);
app.factory('Service', Service);
Service.$inject = ['$http', '$sce'];
function Service($http, $sce) {
mhawila /
Created Mar 25, 2016 — forked from DanHerbert/
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

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.


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.