Skip to content

Instantly share code, notes, and snippets.

View adonley's full-sized avatar
🍜
break bread in the cloud

Andrew Donley adonley

🍜
break bread in the cloud
View GitHub Profile

Keybase proof

I hereby claim:

  • I am adonley on github.
  • I am andrewjdonley (https://keybase.io/andrewjdonley) on keybase.
  • I have a public key whose fingerprint is F047 5B9F B76A F68B D277 DED5 66D2 3567 EC13 FCC0

To claim this, I am signing this object:

@adonley
adonley / Dockerfile
Last active February 1, 2018 10:39
Angular5 Live Reload Dockerfile
FROM node:8.1.2
MAINTAINER Andrew Donley <andrewjdonley@gmail.com>
RUN npm install -g @angular/cli --unsafe-perm \
&& mkdir /app
# Use this instead if you shrinkwrap.
# COPY npm-shrinkwrap.json .
COPY package-lock.json .
@adonley
adonley / make_swap.sh
Created January 26, 2018 00:11
Make swap partition on amazon EC2 instance.
#!/bin/bash
# './make_swap -s 1024' will create a 1024 MB swap
OPTIND=1;
# Size in MB
s="1024";
while getopts "s:" opt; do
@adonley
adonley / LUFactor
Last active December 23, 2015 09:59
Small LU matrix factoring function.
public LUMatriciesAndAnswer luFactor(double[][] matrix) {
// Initialize L and U matrices
double [][] L = new double[matrix.length][matrix.length], U = matrix;
boolean unstable = false;
double pivot = 0;
// Set the diagonal of L to 1
for(int i = 0; i < matrix.length; i++) {
L[i][i] = 1;