Skip to content

Instantly share code, notes, and snippets.

@dprea
dprea / meaninstall.md
Created January 11, 2016 09:07
New Mean Stack (At least Cloud 9)

#INSTALLING MEAN STACK

  1. sudo apt-get update -qq
  2. sudo apt-get install gcc make build-essential
  3. npm rebuild
  4. npm install -g bower
  5. npm install -g node-sass
  6. npm install -g autoprefixer
  7. npm install -g gulp
  8. npm install -g gulp-sass
@dprea
dprea / ng-src-onerror.js
Created January 10, 2016 02:21
Angular ng-src onerror such as image resolves to a broken src
/**
* First is the Angular Directive method of solving.
* Second is the inline onerror fix that results in a default image.
* SOURCE: http://stackoverflow.com/questions/27549134/angularjs-ng-src-condition-if-not-found-via-url
*/
var myApp = angular.module('myApp',[]);
myApp.directive('onErrorSrc', function() {
return {