Skip to content

Instantly share code, notes, and snippets.

View markudevelop's full-sized avatar
🎯
Focusing

Mark markudevelop

🎯
Focusing
View GitHub Profile
@markudevelop
markudevelop / gist:5428f0eda51ae3ca672d13664f37cbae
Last active January 12, 2021 07:49
React SSR Express Caching Middleware (Next.js)
import LRU from 'lru-cache';
import { Request, Response } from 'express';
import createEtag from 'etag';
import prettyMs from 'pretty-ms';
import { isPublicRoute } from './not-found-middleware';
import { app } from '../';
import pandas as pd
import numpy as np
def get_expected_risk_for_system(system):
value_of_positions_proportion_capital = get_positions_as_proportion_of_capital(system)
instrument_returns = get_instrument_returns(system)
instrument_returns = instrument_returns.ffill().reindex(value_of_positions_proportion_capital.index)
@markudevelop
markudevelop / custom-npm-install.config
Created December 23, 2016 10:11 — forked from wearhere/custom-npm-install.config
`npm install`s a Meteor application bundle during AWS Elastic Beanstalk deployment.
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/55npm_install.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# Custom npm install to work with Meteor/s build command
export USER=root
export HOME=/tmp
@markudevelop
markudevelop / deploy_aws.sh
Created December 23, 2016 10:11 — forked from wearhere/deploy_aws.sh
CI script to convert a Meteor application into a Node.js application then deploy it to AWS Elastic Beanstalk.
#!/bin/bash
#
# This script will convert a Meteor application into a Node.js application
# then deploy it to AWS Elastic Beanstalk.
#
# Run like `deploy_aws.sh my_eb_app my_eb_app-production`.
#
# That will deploy the Meteor application containing this script
# to the `my_eb_app-production` environment of the `my_eb_app` EB application.