Skip to content

Instantly share code, notes, and snippets.

View jakemmarsh's full-sized avatar

Jake Marsh jakemmarsh

View GitHub Profile
@jakemmarsh
jakemmarsh / nginx.config
Last active September 13, 2021 11:06
Modify nginx proxy settings in Elastic Beanstalk options
files:
"/tmp/proxy.conf":
mode: "000644"
owner: root
group: root
content: |
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
@jakemmarsh
jakemmarsh / check_deps.js
Created February 21, 2018 21:57
Node script to find any JS files that are not imported anywhere else.
const fs = require('fs');
const path = require('path');
const childProcess = require('child_process');
const directoryToSearch = process.argv[2];
function getAllFilesInDirectory(dirOrFile) {
if (fs.statSync(dirOrFile).isDirectory()) {
return Array.prototype.concat(...fs.readdirSync(dirOrFile).map((f) => getAllFilesInDirectory(path.join(dirOrFile, f))));
} else if (dirOrFile.indexOf('.js') !== -1) {