Skip to content

Instantly share code, notes, and snippets.

View index.html
<!DOCTYPE html>
<meta charset="utf-8"/>
<title>Object iteration</title>
<script src=""></script>
<script src="./suite.js"></script>
<h1>Open the console to view the results</h1>
bholzer /
Created Mar 15, 2020
Fetch and set environment variables from AWS systems manager param store.
params=$(aws ssm get-parameters-by-path --region $REGION --with-decryption --path "/path/to/variable" --recursive)
for param in $(echo $params | jq -r ".Parameters[] | @base64"); do
full_name=$(echo $param | base64 --decode | jq -r ".Name")
read -ra name_components <<< "$full_name"
bholzer / out.rb
Created Feb 8, 2020
View out.rb
{:title=>"General Merchandise - General Merchandise, Bojeux - Orig. Retail $139", :price=>"$62", :manifest_link=>""}
{:title=>"General Merchandise - General Merchandise, As Seen On TV, Up & Up - Orig. Retail $291", :price=>"$91", :manifest_link=>""}
{:title=>"General Merchandise - General Merchandise, Magnolia Home by Joanna Gaines, The Manhattan Toy Company - Orig. Retail $262", :price=>"$75", :manifest_link=>""}
{:title=>"General Merchandise - General Merchandise, Heyday, Kanex - Orig. Retail $504", :price=>"$128", :manifest_link=>""}
View gist:5c8c18752503afecfc40ad320961acec
module.worker_node.aws_autoscaling_policy.worker_node_scale_in: Modifying... [id=worker_node_scale_in]
2019/10/03 16:16:21 [TRACE] GetResourceInstance: aws_autoscaling_group.worker_nodes is a single instance
2019/10/03 16:16:21 [DEBUG] module.worker_node.aws_autoscaling_policy.worker_node_scale_in: applying the planned Update change
2019/10/03 16:16:21 [TRACE] GRPCProvider: ApplyResourceChange
2019-10-03T16:16:21.559-0500 [DEBUG] plugin.terraform-provider-aws_v2.31.0_x4: 2019/10/03 16:16:21 [DEBUG] AutoScaling PutScalingPolicy on Update: {
2019-10-03T16:16:21.560-0500 [DEBUG] plugin.terraform-provider-aws_v2.31.0_x4: AdjustmentType: "PercentChangeInCapacity",
2019-10-03T16:16:21.560-0500 [DEBUG] plugin.terraform-provider-aws_v2.31.0_x4: AutoScalingGroupName: "render_workers",
2019-10-03T16:16:21.560-0500 [DEBUG] plugin.terraform-provider-aws_v2.31.0_x4: Cooldown: 0,
2019-10-03T16:16:21.560-0500 [DEBUG] plugin.terraform-provider-aws_v2.31.0_x4: EstimatedInstanceWarmup: 0,
2019-10-03T16:16:21.560-0500 [
bholzer /
Last active Feb 19, 2022
Blender rendering from the command line.
import sys
import bpy
import addon_utils
argv = sys.argv
argv = argv[argv.index("--") + 1:] # get all args after "--"
C = bpy.context
bpy.context.scene.cycles.device = 'GPU'
cycles_prefs = C.user_preferences.addons['cycles'].preferences
View verbose.rb
def response_for_auth_fail(auth_error: :invalid)
messages = {
invalid: "Some error",
inactive: "Some error"
locked: "Some error"
{ auth_error: auth_error, message: messages[:auth_error] }
bholzer / cloudbuild.yml
Last active Jan 2, 2018
Cloudbuild config for automating deployments to Kubernetes using Helm.
View cloudbuild.yml
- name: ''
# Determine if the commit that triggered this build includes a directive to destroy a previously created environment
# If so, write a file as a flag for conditional future steps, always return true to allow build to continue
entrypoint: '/bin/bash'
- '-c'
- 'git log -n 1 --pretty=format:%s $COMMIT_SHA | grep -q "\[helm\-delete\]" && touch /workspace/helm_delete || true'
- name: ''
View thing.rb
templates = Templates.all
mapped_things = do |pair|
object = templates.find{|t| == pair.second }
object = object.dup
object.thing_id = pair.first
View infinite.jsx
class DateVerifier extends React.Component {
constructor(props) {
this.state = {
dob: null
render() {
return (
import java.awt.Color;
import java.util.*;
public class ColorListSorter {
public static void quickSort(List<Color> list, int pivot, int end) {
if (pivot < end) {
int q = partition(list, pivot, end);
quickSort(list, pivot, q);
quickSort(list, q+1, end);