Skip to content

Instantly share code, notes, and snippets.

View ccampanale's full-sized avatar

Christopher Campanale ccampanale

  • GDIT
  • United States
View GitHub Profile
@ccampanale
ccampanale / monarch.palette.css
Created December 7, 2023 17:10
Monarch Color Palette
/* CSS HEX */
--cyan-rgb: #00FFFFff;
--vivid-sky-blue: #03C6FFff;
--dodger-blue: #058FFFff;
--risd-blue: #0855FFff;
--black: #000000ff;
/* CSS HSL */
--cyan-rgb: hsla(180, 100%, 50%, 1);
--vivid-sky-blue: hsla(194, 100%, 51%, 1);
@ccampanale
ccampanale / space-compliance-investigation.md
Last active September 12, 2022 13:42
Various details collected and analyzed investigating compliance violations inconsistencies in Monarch Spaces.

Process Details

  • An event is used to trigger the creation of a compliance resource update which is used to track details about the Spaces and Accounts which are to be used and the result of the process.
  • There are N Compliance Resource worker nodes in the system which process resource updates for an account being updated. This is fanned out and each node will update all resources for a specific account.
  • The resource update will query the aggregated AWS Config resources for the account, transform the data, and create or update a resource record in the system for each resources in the account.
  • Creating or updated a resource record emits an event which triggers a process to review the ingested AWS config rules evaluation results for the resource and create, update, or delete violations for NON_COMPLIANT violations.

Observations

@ccampanale
ccampanale / test-timers.js
Created January 7, 2021 16:56
NodeJS Timers
async function testImmediate() {
console.log('A');
setImmediate(() => {
console.log('B')
});
await new Promise((resolve) => {
console.log('C');
setTimeout(() => {
console.log('D');
resolve();

Keybase proof

I hereby claim:

  • I am ccampanale on github.
  • I am ccampanale (https://keybase.io/ccampanale) on keybase.
  • I have a public key ASAG-dzI-pKDyZhsbndxS0NKdrtiQ1UsL5QZurVXKTYl_go

To claim this, I am signing this object:

@ccampanale
ccampanale / env2fs.sh
Last active October 28, 2016 17:36
env2fs is a simple script to facilitate the creation of files from environment variables
#!/bin/bash -e
#
# env2fs is a simple script to facilitate the creation of files from environment variables
# check for help
if [[ $1 =~ ^--help|^-h ]]
then
echo "usage: env2fs.sh"
echo
echo "env2fs is a simple script to facilitate the creation of files from environment variables."
@ccampanale
ccampanale / vaultsealmanager.sh
Created December 10, 2015 19:31
Bash shell script to check seal status for local vault server and attempt to unseal using keys secured in vault secret store. Supports HA Vault clusters with TLS with unseal keys stored as secrets in vault (see code). Relies on registered service vault.service.consul, in place DNS configuration, and a single unsealed vault instance in your clust…
#!/bin/bash
export vault=/usr/local/bin/vault
export VAULT_TOKEN=$(cat /root/.vault-token)
vault_cacert='-ca-cert=/path/to/your/ca.pem'
local_vault="-address=https://$(hostname -f):8200"
unsealed_vault="-address=https://$(getent hosts $(dig +short vault.service.consul | tail -n 1) | awk '{ print $2 }'):8200"
leader_vault="-address=https://$($vault status $vault_cacert $unsealed_vault 2> /dev/null | grep Leader | awk '{ print $2 }' | sed 's/^http\(\|s\):\/\///g'):8200"
vault_read="$vault read $vault_cacert $leader_vault"
vault_unseal="$vault unseal $vault_cacert $local_vault"