Install Homebrew prereqs:
xcode-select --install
Install Homebrew
| /*Initial Referance taken from https://gist.github.com/thewarpaint/889690aeb21a8dfd7aba and modified as per the requirement.*/ | |
| angular.module('Utils',[]).filter('isoCurrencyWithK', ["$filter", "iso4217", function ($filter, iso4217) { | |
| return function (amount, fraction, currencyCode) { | |
| var exp = 0, rounded, currency, nagative, suffixes = ['','K', 'M', 'G', 'T', 'P', 'E']; | |
| //set decimal amount. Default 0 | |
| var fractionSize = fraction === void 0 ? 0 : fraction; | |
| //check if the amount is more than 1000 | |
| //if yes, set suffix for the amount | |
| if(amount >= 1000 || amount < -1000 ) { |
| // Based on http://stackoverflow.com/questions/1571374/converting-values-to-unit-prefixes-in-jsp-page. | |
| // The inner filter function can be used standalone. | |
| angular.module('Utils') | |
| .filter('thousandSuffix', function () { | |
| return function (input, decimals) { | |
| var exp, rounded, | |
| suffixes = ['k', 'M', 'G', 'T', 'P', 'E']; | |
| if(window.isNaN(input)) { |
#How to install node.js and CouchDB on a Google Compute Engine instance
Make sure you have a Google Compute engine account, have a project created and the gcutil command line tool installed.
Since want to ssh without the gcutil tool, you need to a your ssh key to the instance in addition to the already existing google_compute_engine key (used for gcutil).
##Installing Node.js on Amazon Linux AMI
The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes
For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh
sudo yum update -y| var moment = require('moment'), | |
| path = require('path'), | |
| crypto = require('crypto'), | |
| multer = require('multer'); | |
| module.exports = function (app) { | |
| app.post('/upload', multer({ | |
| storage: multer.diskStorage({ |