Finishing this guide you'll get:
- A running Ghost installation
- Amazon SES mail configuration
- Simple ssh hardenings
- Nginx proxy
- Node.js configured with forever
Specification of latest running installation:
| * { | |
| font-size: 12pt; | |
| font-family: monospace; | |
| font-weight: normal; | |
| font-style: normal; | |
| text-decoration: none; | |
| color: black; | |
| cursor: default; | |
| } |
Finishing this guide you'll get:
Specification of latest running installation:
| var Fiber = require('fibers') | |
| var getResp = function (url, callback) { | |
| var fn = Fiber(function () { | |
| var resp = handleRequest(url); | |
| if (resp.statusCode != 200) { | |
| //handle success response | |
| } else { | |
| //handle other responses here | |
| } |
#Bottled Water
##Summary
Bottled water takes advantage of logical decoding (available with PostgreSQL 9.4) to funnel changes made to the database to a Kakfka stream in an Avro format which can then be transformed and sent somewhere else in a stream. Until PostgreSQL 9.4, if you wanted to stream changes you had to use triggers which is unappealing because of the burden they place on the databse servers.
| var crypto = require('crypto'); | |
| var util = require('util'); | |
| var request = require('request'); | |
| var sbNamespace = '{YOUR NAMESPACE}'; | |
| var sbEntityPath = '{YOUR QUEUE}'; | |
| var sharedAccessKey = 'LBgdFoE........lFyvW4='; | |
| var sharedAccessKeyName = '{POLICY NAME}'; | |
| var sas = getSASToken(sbNamespace, sbEntityPath, sharedAccessKeyName, sharedAccessKey); |
| # Login to Azure PowerShell | |
| Login-AzureRmAccount | |
| # Create the self signed cert | |
| $currentDate = Get-Date | |
| $endDate = $currentDate.AddYears(1) | |
| $notAfter = $endDate.AddYears(1) | |
| $pwd = "P@ssW0rd1" | |
| $thumb = (New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName com.foo.bar -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $notAfter).Thumbprint | |
| $pwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText |
| gulp.task('webjob', function() { | |
| var webjob = "feedFetcher.zip"; | |
| del(webjob) | |
| return gulp.src(['parsers/*.js', 'package.json', 'feedFetcher.js'], {base: "."}) | |
| .pipe(zip(webjob)) | |
| .pipe(gulp.dest('.')); | |
| }); |
If you just want to fix the issue quickly, scroll down to the "solution" section below.
If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:
$ npm update npm -g
| /** | |
| * Module dependencies. | |
| */ | |
| var net = require('net'); | |
| var inherits = require('util').inherits; | |
| var EventEmitter = require('events').EventEmitter; | |
| /** |