Skip to content

Instantly share code, notes, and snippets.

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
msimmons@nagios:/opt/collectd/etc$ cat collectd.conf
# Generated by Puppet
#Hostname localhost
FQDNLookup true
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db"
Interval 10
@josephholsten
josephholsten / sizeup.lua
Last active June 4, 2022 11:41
SizeUp in Hammerspoon
-- === sizeup ===
--
-- SizeUp emulation for hammerspoon
--
-- To use, you can tweak the key bindings and the margins
local sizeup = { }
--------------
-- Bindings --
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@petecheslock
petecheslock / gist:7072317
Last active December 26, 2015 01:38
Grandma Evelyn's Challah
===============
Challah (This Makes 2 Loaves - or one big ass challah.
INGREDIENTS:
- 12 ounces water (105-115 degrees fahrenheit)
- 1/4 cup honey
- 4 1/4 tsp. Active Dry-Yeast
- 32 oz. Bread Flour, by weight (or approx 5-6 cups)
- 1 tablespoon Kosher Salt
@tobstarr
tobstarr / Dockerfile
Last active December 20, 2015 14:29
Dockerfile for running OpenTSDB
FROM ubuntu
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl build-essential git-core
RUN if [ ! $(grep universe /etc/apt/sources.list) ]; then sed 's/main$/main universe/' -i /etc/apt/sources.list && apt-get update; fi
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk
RUN mkdir -p /opt/downloads && cd /opt/downloads && curl -SsfLO "http://www.apache.org/dist/hbase/hbase-0.94.10/hbase-0.94.10.tar.gz"
RUN cd /opt && tar xvfz /opt/downloads/hbase-0.94.10.tar.gz
RUN mkdir -p /data/hbase
RUN mkdir -p /root/.profile.d
RUN mkdir -p /root && echo Zm9yIHByb2ZpbGVfcGF0aCBpbiAkKGZpbmQgL3Jvb3QvLnByb2ZpbGUuZC8gLXR5cGUgZik7IGRvIHNvdXJjZSAkcHJvZmlsZV9wYXRoOyBkb25lCg== | base64 -d > /tmp/wunderscale.e4e4b9a9fbb0a7813a4707407606ccb195999effc1d27eac75a879113a4a017b && mv /tmp/wunderscale.e4e4b9a9fbb0a7813a4707407606ccb195999effc1d27eac75a879113a4a017b /root/.profile
RUN mkdir -p /root/.profile.d && echo ZXhwb3J0IEpBVkFfSE9NRT0vdXNyL2xpYi9qdm0vamF2YS02LW9wZW5qZGstYW1kNjQK | base64 -d > /tmp/wundersc

How to bake decent bagels

I basically follow this recipe with a few exceptions.

homestyle bagels

Instead of malt syrup, I substitute molasses.

For a standard batch of 8-10 decent sized plain bagels, here's the ingredient list:

@rockpapergoat
rockpapergoat / purge_old_kernels.rb
Last active November 3, 2016 13:46
script to provide some kernel purging routines for ubuntu/debian. this is a first pass at a maintenance script.
#!/usr/bin/env ruby
# 130306, nate
# automate purging old kernels from /boot and updating/upgrading
require 'optparse'
def get_installed_kernels
installed = %x(/usr/bin/dpkg --get-selections).split("\n").map! {|e| e.sub!(/\t+install/,"")}
kernels = installed.select {|pkg| pkg =~ %r[linux-image]}
end
@rockpapergoat
rockpapergoat / plato_republic_book1_gangsta.markdown
Last active June 13, 2017 15:49
plato's first book of "the republic," as translated by gizoogle

Book 1

I went down yesterdizzle ta tha Piraeus wit Glaucon tha lil hustla of Ariston, dat I might offer up mah lyrics ta tha goddess (Bendis, tha Thracian Artemis.); n' also cuz I wanted ta peep up in what tha fuck manner they would big-up tha festival, which was a freshly smoked up thang. I was delighted wit tha procession of tha inhabitants; but dat of tha Thracians was equally, if not more, dope. When our crazy-ass asses had finished our lyrics n' viewed tha spectacle, our crazy-ass asses turned up in tha direction of tha hood; n' at dat instant Polemarchus tha lil hustla of Cephalus chizzled ta catch sight of our asses from a thugged-out distizzle as our crazy-ass asses was startin on our way home, n' busted some lyrics ta his servant ta run n' bid our asses wait fo' his muthafuckin ass. Da servant took hold of mah crazy ass by tha cloak behind, n' holla'd: Polemarchus desires you ta wait.

I turned round, n' axed his ass where his crazy-ass masta was.

There he is, holla'd tha youth, comin afta y

#!/bin/bash
#
# This is the script responsible for updating our Puppet master data,
# which includes modules, manifests, hiera data, etc. All of this data is
# managed in a git repository and upon "deploy" it is synced into the Puppet
# master.
#
# This script mirrors the remote git repository, looking for branches that
# match "env-*" (such as "env-production" or "env-test"). Each of these branches
# is setup as an environment into the Puppet master's data files. The