Skip to content

Instantly share code, notes, and snippets.

View bsclark's full-sized avatar

Brent S. Clark bsclark

View GitHub Profile
@sanyer
sanyer / README.md
Last active September 30, 2025 05:48
Awesome Steam Deck
@filipenf
filipenf / aws-s3-buckets-with-tags.sh
Created April 22, 2015 18:46
Print a list of aws buckets along with their tags
#!/bin/bash
# lists all buckets along with their tags in the following format:
# bucket_name | { tag_name: tag_value }
# depends on AWS CLI and JQ
for bucket in `aws s3api list-buckets | jq .Buckets[].Name | tr -d \"`; do
tags=$(aws s3api get-bucket-tagging --bucket $bucket | jq -c '.[][] | {(.Key): .Value}' | tr '\n' '\t')
echo $bucket '|' $tags
done
@hcoyote
hcoyote / check_hadoop_safemode.pl
Created February 22, 2012 17:29
Determine if our HDFS is in safemode for some reason.
#!/usr/bin/perl
#
# This script is managed by puppet.
#
use strict;
use warnings;
use File::stat;
use Getopt::Long;
@nstielau
nstielau / send_metric_to_statsd.sh
Created May 11, 2011 16:41
Send a metric to StatsD from bash
# Send a metric to statsd from bash
#
# Useful for:
# deploy scripts (http://codeascraft.etsy.com/2010/12/08/track-every-release/)
# init scripts
# sending metrics via crontab one-liners
# sprinkling in existing bash scripts.
#
# netcat options:
# -w timeout If a connection and stdin are idle for more than timeout seconds, then the connection is silently closed.