Skip to content

Instantly share code, notes, and snippets.

View dambrogia's full-sized avatar
🏠
Working from home

Dominic Dambrogia dambrogia

🏠
Working from home
View GitHub Profile
@dambrogia
dambrogia / binary-tree-traversals.js
Created April 10, 2024 00:25
Binary Tree Traversals
/**
* @typedef {object} TreeNode
* @property {number} val
* @property {Node} left
* @property {Node} right
*/
function TreeNode(val, left = null, right = null) {
this.val = val;
this.left = left;
this.right = right;
@dambrogia
dambrogia / warden-install-script.sh
Last active December 21, 2021 20:55
warden_local_env_install.sh
function install_local_env {
sudo yum install -y nano vim zsh htop curl wget php-pecl-xdebug
git clone https://github.com/ohmyzsh/ohmyzsh.git /home/www-data/.oh-my-zsh;
cp /home/www-data/.oh-my-zsh/templates/zshrc.zsh-template /home/www-data/.zshrc;
sed -i s^robbyrussell^candy^g /home/www-data/.zshrc;
git clone https://github.com/dambrogia/oh-my-zsh-plugin-magento-2.git /home/www-data/.oh-my-zsh/custom/plugins/magento-2
sed -i s^"plugins=(git)"^"plugins=(git magento-2)"^g /home/www-data/.zshrc
echo "/var/www/html" > /home/www-data/.oh-my-zsh/custom/plugins/magento-2/mage_root.txt
sudo touch /var/log/xdebug.log
sudo chown www-data:www-data /var/log/xdebug.log
const fs = require('fs');
const readline = require('readline');
const fetch = require('node-fetch'); // npm i node-fetch
const getApiKey = () => '<update this>';
const getBatchSize = () => 25;
/**
* Make a search request to sendgrid to get the ids of the contacts for the
* provided emails.
* @param {String[]} emails
@dambrogia
dambrogia / assessment.md
Last active June 23, 2022 03:59
PSA Infrastructure Assessment

Palmetto State Armory Infrastructure Assessment

Our goal here is to get a general idea of your work. We're looking for well documented and easy to read code that is very straight forward to deploy and/or replicate. There is no hard requirement for how this task needs to be done. We use ansible + aws in our production environment, but there are many tools to do the job.

Ideally you would spend an hour or two to get this done, our goal isn't to take up your time but just to see a glimpse of your work. If you can reasonably cut a corner to save some time, just explain the corner that you cut and how would you do it better if you had more time.

The requirements should be as clear as possible so our expectations are the same. If you have questions, comments or concerns, please let us know.