Skip to content

Instantly share code, notes, and snippets.

View nstielau's full-sized avatar

Nick Stielau nstielau

  • Red Hat
  • San Francisco
View GitHub Profile
/*
CSS Hacks to change "Postmortem" to "Incident Review" on
the statuspage.io pages. Nobody died.
*/
.update.postmortem strong {
display: none;
}
.update.postmortem {
color: white;
<script type="text/javascript" src="http://0to255.com/d862cb.js?variable=myColors"/>
<script type="text/javascript">
for (i=0; i< myColors.colors.length,i++) {
document.write("<div style='background-color:" + myColors.colors[i] + ";height:20px;'></div>");
}
</script>
#!/usr/bin/ruby
if ARGV.size < 1 || ARGV.size > 2
puts "Usage: #{__FILE__} PATH_TO_PROJECT [CIJOE_URL]"
exit 1
end
##############################
JABBER_USERNAME = "example@gmail.com"
JABBER_PASSWORD = "secret"
#!/usr/bin/env ruby
require 'rubygems'
require 'stomp'
################################
# Config
stage = "dev"
host = "example.com"
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
##################################
# Edit these
set :application, "example_node_app"
set :node_file, "hello_world.js"
set :host, "ec2-174-129-114-66.compute-1.amazonaws.com"
ssh_options[:keys] = [File.join(ENV["HOME"], ".ec2", "default.pem")]
set :repository, "git://gist.github.com/479007.git"
set :branch, "master"
@nstielau
nstielau / victorops.json
Created February 12, 2014 19:13
Configuring Sensu for VictorOps
{
"handlers": {
"victorops": {
"type": "pipe",
"command": "/etc/sensu/handlers/victorops.rb"
}
},
"checks": {
"tmp_check": {
"description": "check that /tmp exists ",
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="plugin_functions-Type" plugin_functions="text/html; charset=utf-8">
<title>jQuery noConflict() for third-party-widgets</title>
<!-- Date: 2010-09-12 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/JavaScript"></script>
</head>
@nstielau
nstielau / gist:742862
Created December 16, 2010 00:57
scalr "ec2_get_option_query_env list-virtualhosts" output
root@ec2-174-129-105-XXX:/usr/local/aws/bin# ec2_get_option_query_env list-virtualhosts
<?xml version="1.0"?>
<response><vhosts><vhost hostname="assets3.XXXinc.com" https="0" type="apache"><raw><![CDATA[0]]></raw></vhost></vhosts></response>
@nstielau
nstielau / crontab_entry.sh
Created January 19, 2011 17:43
Simple script for pushing data to Mongolab mongodb REST api via Curl.
Nicks-MacBook-Pro:viewer nstielau$ crontab -l
*/5 * * * * /path/to/send_metric_to_mongolab.sh
module Mongoid
module Processable
extend ActiveSupport::Concern
included do
@action = :process
@timeout = 60
@query = {}
field :processable, :type => Hash, :default => {:processable => {:locked_by => nil, :locked_at => nil, :last_error => nil}}
end