Skip to content

Instantly share code, notes, and snippets.

Daniel danielgormly

  • Sydney
Block or report user

Report or block danielgormly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danielgormly
danielgormly / Dockerfile
Created Mar 5, 2018
Amazon Linux NPM Install
View Dockerfile
FROM amazonlinux
ENV VERSION="8.9.4"
ENV NVM_DIR="/root/.nvm"
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash \
&& [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" \
&& nvm install $VERSION
ENV PATH="${NVM_DIR}/versions/node/v${VERSION}/bin:${PATH}"
WORKDIR /var/task
@danielgormly
danielgormly / MiniKoa.js
Last active Mar 19, 2017
Microcosm of Koa's flow control
View MiniKoa.js
/*
MiniKoa ^.^
- In the real Koa, the module Koa-composer takes on the recursive behaviour.
- This still works with async functions because await will automatically convert resolved values into promises.
- The most notable difference of course is that this doesn't respond to an http request instead it just runs instantly with whatever context object you give it.
*/
class MiniKoa {
constructor() {
this.middleware = [];
You can’t perform that action at this time.