Skip to content

Instantly share code, notes, and snippets.

View gkedge's full-sized avatar

Greg Kedge gkedge

  • Metron, Inc
  • Reston, VA
View GitHub Profile
@gkedge
gkedge / vagrant-hardened-ubuntu-20-04.yml
Last active January 27, 2023 18:29
Ansible Playbook: Hardened SSL and Vagrant Ready (ubuntu 20.04)
---
# Initial server setup; run on guest after 'Assumptions' are addressed:
# Forked from: https://www.vultr.com/docs/how-to-configure-a-new-ubuntu-server-with-ansible
#
# VirtualBox OS Prep
#
# Assumptions:
# Already have used VirtualBox Manager to:
# * create new VirtualBox ubuntu 20.04.3+ using VirtualBox Manager:
# * General > Basic:
@gkedge
gkedge / Spread Promise.all
Last active August 21, 2016 20:24
I like q.js's spread idea to an ordered argument list instead of an array of results
(function (Promise:Function /* Strange, but true... according to Flow */) {
"use strict"
// This function cannot(!) use the 'this'-binding fat arroq: () ==> {}
Promise.spread = function (promises:Array, fulfilled:Function, rejected:?Function):Promise {
return Promise.all(promises).spread(fulfilled, rejected)
}
// This function cannot(!) use the 'this'-binding fat arroq: () ==> {}
// eslint-disable-next-line no-extend-native