Skip to content

Instantly share code, notes, and snippets.

@markstuart
markstuart / data.json
Last active April 14, 2021 03:34 — forked from ebuckley/data.json
Ministry of silly walks test data
{
"@context": "https://www.data.govt.nz/catalog.jsonld",
"@id": "https://www.ministry-of-silly-walks.govt.nz/data.json",
"@type": "dcat:Catalog",
"conformsTo": "https://www.data.govt.nz/toolkit/schema",
"dataset":
[
{
"title": "Convention Activity Survey",
"description": "The Convention Activity Survey (CAS) monitors and benchmarks the performance of more than 300 professional conferencing and meeting venues in New Zealand. The CAS is the 'supply-side' component of the Convention Research Programme.",
@markstuart
markstuart / ng-serve-docker-nginx-proxy.md
Last active October 29, 2018 22:22
Running Angular CLI in local dev behind docker nginx reverse proxy

Setup

Angular app talking to multiple microservices using Cookie authentication on ajax requests. Cookies are not passed over cross domain ajax requests, so we need to be able to have the Angular app and microservices running on same-domain in local dev as well as in production.

We have a Docker nginx proxy running on localhost:8000:

  • proxying to multiple microservices on localhost:8000/api/<microservice>
  • proxying other requests to Angular CLI (ng serve) on en0 inet (192.168.1.5 for instance) port 4200
  • using a python script to get the correct en0 IP and write it to the nginx config at proxy startup
@markstuart
markstuart / lts-ify.txt
Last active July 8, 2016 11:49
Getting LTS-ified
// Node and npm
npm i -g n
n lts
npm i -g npm@lts
// Bower
npm i -g bower
// Ember CLI
npm rm -g ember-cli