Skip to content

Instantly share code, notes, and snippets.

# Add to .profile / .zprofile
# Requires 1Password CLI v2
# To setup: op account add
# Change ITEM to choose where 1Password looks
op-clip-okta() {
echo "Fetching ${ITEM} OTP from 1Password"
View xmas-lights-1.ino
#include <FastLED.h>
#include <MicroView.h>
#include <RBD_Timer.h>
#include <RBD_Button.h>
// FastLED "100-lines-of-code" demo reel, showing just a few
// of the kinds of animation patterns you can quickly and easily
// compose using FastLED.
benders / squid.conf
Last active Mar 26, 2017
QNAP squid.conf
View squid.conf
# The user name and group name Squid will operate as
cache_effective_user httpdusr
cache_effective_group everyone
# Recommended minimum configuration:
# Auth Method
#auth_param basic program /share/MD0_DATA/.qpkg/Squid/opt/libexec/squid/ncsa_auth /etc/shadow
#auth_param basic children 5
benders / iscsi-removal.txt
Created Jan 17, 2014
isci removal example
View iscsi-removal.txt
df ; echo ; pvs
vgchange --available n VolGroupBackUps
multipath -ll
multipath -f mpath2
/etc/init.d/multipathd stop
chkconfig multipathd off
iscsiadm -m node
set -ex
wget -O /etc/apt/sources.list
apt-get update
wget -O /tmp/
benders / delayed_job_classifier.sql
Last active Dec 27, 2015
Figure out WTF is in our delayed_job queue
View delayed_job_classifier.sql
count(*) as count, priority, object, method from (
@load_start := LOCATE('object: LOAD;', handler),
@method_start := LOCATE('method: ', handler) + 9,
@method_end := LOCATE('args:', handler) - 1,
@object_start := @load_start + 13,
@object_start := LOCATE('object: !ruby/object:', handler) + 21
benders /
Created Oct 19, 2013
Get some New Relic on a Puppet Master server (version 2.7)
# Oh ho ho, let's see if we can have some fun with the Ruby Agent - Nic 2013-10-18
require 'rubygems'
require 'newrelic_rpm'
require 'new_relic/agent/instrumentation/rack'
# END monkey-business
# A "", for use with every Rack-compatible webserver.
# SSL needs to be handled outside this, though.
$0 = "master"
benders / new-employee-setup.txt
Last active Dec 17, 2015
New Employee setup
View new-employee-setup.txt
Repair Homebrew permissions
sudo chmod g+w /usr/local/
Put Chrome and Firefox on dock
Download and Install
Run TextMate and setup terminal helper in /usr/local/bin
benders /
Last active Jul 27, 2016
New Employee git setup
FULLNAME=`finger "$USER" | awk -F: '{ print $3 }' | head -n1 | sed 's/^ //'`
# Git needs to know who you are!
git config --global "${FULLNAME}"
git config --global "${USER}"
# SVN style shortcuts
git config --global status
git config --global commit
git config --global checkout
benders / cisco-asa-config.txt
Last active Nov 23, 2021
Getting Amazon VPC up and running with Cisco ASAs can be a pain. This is the config that we used to make it work.
View cisco-asa-config.txt
! --------------------------------------------------------------------------------
! This example configuration shows what WE did to get Amazon VPC working with our
! ASAs. We use version 8.3(1). This config has not been reviewed or otherwise
! blessed in any way by anyone at Amazon. YMMV.
! It differs from Amazon's supplied config by using two different sets of
! crypto maps and ACLs, so it brings both tunnels up simultaneously.
! For the purposes of the example, the physical datacenter network is
! and the VPC is