Skip to content

Instantly share code, notes, and snippets.

View irvingpop's full-sized avatar

Irving Popovetsky irvingpop

View GitHub Profile
irvingpop /
Last active July 7, 2022 18:27
Honeycomb column deletion tools
#!/usr/bin/env python3
# usage: [-h] -k API_KEY -d DATASET [-m {hidden,spammy}]
# Honeycomb Dataset Column Cleanup tool
# arguments:
# -h, --help show this help message and exit
# -k API_KEY, --api-key API_KEY
# Honeycomb API key
# -d DATASET, --dataset DATASET
# Honeycomb Dataset
irvingpop /
Last active September 26, 2018 18:26
How big is my Chef node object?

first, enter chef-shell:

$ chef-shell
loading configuration: none (standalone session)
Session type: standalone

This is the chef-shell.
 Chef Version: 14.3.37
irvingpop / okta-aws.plugin.zsh
Created September 17, 2018 20:32
okta_aws plugin for oh-my-zsh
View okta-aws.plugin.zsh
# shellcheck disable=SC2148
# shellcheck disable=SC2034
# okta-aws plugin for oh-my-zsh
# for use with the bullet-train oh-my-zsh theme:
# (although this could be easily changed)
# Irving Popovetsky <>
# default profile is used if you don't set one using AWS_PROFILE, which is recommended
irvingpop / Install-DockerOnWS2016ByDSC.ps1
Created August 10, 2018 21:16 — forked from PlagueHO/Install-DockerOnWS2016ByDSC.ps1
Install Docker on Windows Server 2016 RTM using DSC
View Install-DockerOnWS2016ByDSC.ps1
Configuration ContainerHostDsc
# Set up general parameters used to determine paths where Docker will
# be installed to and downloaded from.
$ProgramFiles = $ENV:ProgramFiles
$DockerPath = Join-Path -Path $ProgramFiles -ChildPath 'Docker'
$DockerZipFileName = ''
$DockerZipPath = Join-Path -Path $ProgramFiles -ChildPath $DockerZipFilename
$DockerUri = ''
irvingpop / travis.yml
Last active May 8, 2018 04:19
Example Travis config to build, smoketest and publish a hab package as a docker container
View travis.yml
sudo: required
dist: trusty
services: docker
language: bash
- 'curl | sudo bash'
irvingpop /
Last active October 25, 2021 10:59
Chef Server Report: Script to list all nodes in all orgs, grouped by org, then environment, then chef client version.

Example output:

root@chef:~# ./chef_server_nodes_report.rb -h
Usage: chef_server_nodes_report.rb [options]
    -g, --group-by TYPE              Group results by: ["version", "org", "environment", "check_in_month", "check_in_date", "platform_family", "platform_version", "platform", "os"]

root@chef:~# ./chef_server_nodes_report.rb --group-by version
loading config from /etc/opscode
irvingpop /
Last active June 18, 2018 18:47
Quickly launch and preconfigure a Windows 2016 dev machine in AWS with spot pricing, from your mac
#!/bin/bash -ex
# Quickly launch and preconfigure a Windows 1803 dev machine in AWS with spot pricing, from your mac
usage=' --username irving --password Cod3Can! --ssh-key irving --subnet subnet-7fd06308 --security-group-id sg-8a0f82f5
NOTE: Due to a weird assumption in the UserData script, the password must be exactly 8 characters long and meet complexity requirements
NOTE2: Create a SECURITY_GROUP_ID that allows port 3389 from your IP address
NOTE3: Install Microsoft Remote Desktop 10 from the app store ( )
irvingpop / .gitignore
Last active January 30, 2023 22:31
Launch EC2 spot instances with tags, like a boss
View .gitignore
irvingpop /
Last active August 6, 2023 09:06
Terraform external data source example - dynamic SSH key generation
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"
View fix_notifications_binds.patch
From 4fb2f312c60cd10f57c08051d4243d3e62b1fbfb Mon Sep 17 00:00:00 2001
From: Irving Popovetsky <>
Date: Fri, 18 Aug 2017 13:05:55 -0700
Subject: [PATCH] Fix notifications habitat binds so that they can be optional
and remove an unneeded one for database
diff --git a/notifications/habitat/config/env b/notifications/habitat/config/env
index faa23c642..19d70da22 100644
--- a/notifications/habitat/config/env