Skip to content

Instantly share code, notes, and snippets.

View johntdyer's full-sized avatar

John Dyer johntdyer

View GitHub Profile
@ikennaokpala
ikennaokpala / google_jsapi.haml
Created September 24, 2011 21:09
load google JSAPI with HAML
!!!
%html
%head
%title
= csrf_meta_tag
= stylesheet_link_tag "layout"
%script{:src=>"http://www.google.com/jsapi", :type=>"text/javascript"}
%script{:type=>"text/javascript"}
google.load("chrome-frame", "1.0.2");
google.load("dojo", "1.6.1");
@jbz
jbz / example attribs file
Created January 6, 2012 17:45
Setting up chef-client using userdata bootstrap scripts
{
"run_list": [
"recipe[chef-client::config]",
"recipe[chef-client::service]",
"recipe[chef-client::delete_validation]",
"recipe[runit]",
"role[locke-validation-app]"
],
"chef_client": {
"server_url": "https://api.opscode.com/organizations/mdsol",
@johntdyer
johntdyer / devops.md
Last active October 4, 2015 01:57
DevOps Job Posting

Looking for full-time Operations Ninja's ( Senior & Junior )

We're Tropo - a team of entrepreneurial types changing the face of telecommunications. We build software that lets developers control the phone system - making calls, recording calls, sending and receiving text messages, etc and beyond. Our customers include startups, hobbyists, Fortune 100 companies, as well as the Telcos themselves. We're big enough to have offices worldwide, but small enough you won't be a faceless cog in the corporate machine.

Why work with us?

  • We're solving interesting problems. Tired of clients with yet another social network for cats?
  • We have awesome benefits. Mind-blowing in fact. Medical, dental, the works, 100% paid for by us for you and your family. We even provide a loaded flex card for use to pay deductibles and copays!
@winhamwr
winhamwr / tutorial.md
Created June 4, 2012 22:37
Creating a repeatable, dynamic site to site VPN with OpenSwan on Ubuntu 10.04 from Amazon EC2

Creating a dynamic site-to-site VPN with OpenSwan on Ubuntu 10.04 on EC2

Wes Winham [email protected]

There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.

@jordansissel
jordansissel / RESULTS.md
Created September 21, 2012 07:41
screenshot + code showing how to query logstash/elasticsearch with a graphite function.

logstash queries graphed with graphite.

Operation: Decouple whisper from graphite.

Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.

Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?

The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.

Job Posting

Title: Senior Systems Engineer
Company: Tropo Inc.
Reports to: Director of Platform Operations
Job Type: Permanent 40 hours per week plus On-Call shift rotation
Location: Atlanta, GA / Remote
#!/usr/bin/env ruby
require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-handler'
require 'hipchat'
require 'timeout'
module Sensu::Extension
class Hipchat < Handler # Sub-class the appropriate extension type
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active October 16, 2024 08:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@cwjohnston
cwjohnston / README.md
Last active March 30, 2018 13:09
Sensu Scheduled Downtime POC

Sensu Scheduled Downtime Event Annotation

As part of helping a customer develop their proof of concept monitoring system with Sensu Enterprise, I worked up a mutator which uses stash data to determine if an event occurred within a pre-defined maintenance window.

The idea here is that event data needs to be annotated to indicate whether an event occurred during a scheduled maintenance window for SLA reporting purposes. With this added downtime context, events logged to an external source (e.g. greylog, elasticsearch) via Sensu Enterprise event bridge should provide enough information to determine whether or not a client's check result matches a scheduled downtime window.

Please note that I have done very little in the way of testing so this plugin is not likely to be very robust. Since this mutator probably needs to be applied to every event, it should probably be implemented as an extension before being put into a production system.

Assumptions

@johntdyer
johntdyer / unifi-cloudkey.md
Created November 25, 2018 17:23
Unifi Cloudkey
title date draft categories tags thumbnail
Using Let's Encrypt Certificates with Unifi
2018-04-25
false
Security
unifi
lets-encrypt
ssl
/images/2018/04/lets-encrypt-logo.png

Let's Encrypt is a great service that automates deployment and renewal of SSL certificates, at a bargain price. For most situations where you have a regular OS, the default Certbot Acme client works well. However for more embedded solutions, like Ubiquiti's Unifi Cloudkey this is not an option as there is no full Linux OS. After researching a few of the alternative options, Acme Shell was the clear winner. It runs using the Bourne shell, and has Unifi support built in.