#INSTALLING MEAN STACK
- sudo apt-get update -qq
- sudo apt-get install gcc make build-essential
- npm rebuild
- npm install -g bower
- npm install -g node-sass
- npm install -g autoprefixer
- npm install -g gulp
- npm install -g gulp-sass
| /** | |
| * 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 { |
#INSTALLING MEAN STACK
| 'use strict'; | |
| /** | |
| * Module dependencies. | |
| */ | |
| var mongoose = require('mongoose'), | |
| Schema = mongoose.Schema; | |
| /** | |
| * Article Schema |
$ find . -type f | wc -lExplanation: find . -type f finds all files ( -type f ) in this ( . ) directory and in all sub directories, the filenames are then printed to standard out one per line.
This is then piped | into wc (word count) the -l option tells wc to only count lines of its input.
Together they count all your files.
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| # Uses Vim to create a text file (file.txt) with text 'hello' | |
| # Save and quit Vim | |
| vim file.txt -c '$put =\'hello\' -c 'wq' | |
| # ----------------------------------------------------------------------------------------- | |
| # SOURCE http://stackoverflow.com/questions/5978108/open-vim-from-within-bash-shell-script | |
| # ----------------------------------------------------------------------------------------- | |
| # vim -c | |
| # -c => pass ex commands. | |
| # Example: vim myfile.txt -c 'wq' to force the last line of a file to be newline terminated | |
| # (unless binary is set in some way by a script) |
A Pen by Dustin Rea on CodePen.
#Google Maps - Store Locator Reference
https://googlemaps.github.io/js-store-locator/reference.html
| /** | |
| * Makes the Workable Job Items(.whr-item) Clickable | |
| * | |
| * @author: Dustin Rea | |
| */ | |
| var whrClickable = function() { | |
| setTimeout(function() { | |
| jQuery('.whr-item').click(function() { | |
| window.location = jQuery(this).find('.external').attr('href'); | |
| return false; |