Skip to content

Instantly share code, notes, and snippets.

View ocxo's full-sized avatar
💆‍♂️
domakesaythink

ocxo ocxo

💆‍♂️
domakesaythink
  • Vacant
View GitHub Profile
# Description:
# Incident management
#
# Commands:
# hubot (create|open|start) new incident (on|for|about|of) service-name
moment = require('moment')
# create the incident channel with a custom name + date created
createChannel = (channelName, timestamp, user, robot, msg) ->
# set up iam users, groups, roles, policies for cross account sts assume role access
# devs have near full rights to dev account, read access to prod with mfa requirement
# works great with a bit of https://github.com/remind101/assume-role for cli switching
# create a thing in one account vs the other
variable "prod_enable_flag" {
default = {
stage = 0
prod = 1
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "sock",
"host": {
"sourcePath": "/var/run/docker.sock"
}
},
{
#! /bin/sh
# Userify Shim Installer
# Copyright (c) 2011-2016 Userify Corporation
# How the shim works:
#
# 1. Installer creates /opt/userify/ containing:
#
# a. /opt/userify/creds.py
/*! p5.js v0.4.20 December 17, 2015 */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.p5 = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
},{}],2:[function(_dereq_,module,exports){
// Run-time checking of preconditions.
'use strict';
// Precondition function that checks if the
$ docker-machine create \
> -d virtualbox \
> --virtualbox-disk-size 50000 \
> --swarm \
> --swarm-master \
> --swarm-discovery="consul://$(docker-machine ip swarm-consul-master):8500" \
> --engine-opt="cluster-store=consul://$(docker-machine ip swarm-consul-master):8500" \
> --engine-opt="cluster-advertise=eth1:0" \
> swarm-master
Running pre-create checks...
May 19, 2015 8:47:51 PM WARNING hudson.remoting.AbstractByteArrayCommandTransport$1 handle
Failed to construct Command
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2323)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2792)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:800)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:298)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
$ cat logstash.json
{
"title": "Logstash Search",
"services": {
"query": {
"list": {
"0": {
"query": "{{ARGS.query || '*'}}",
"alias": "",
"color": "#7EB26D",
$ cat logstash.js
/* global _ */
/*
* Complex scripted Logstash dashboard
* This script generates a dashboard object that Kibana can load. It also takes a number of user
* supplied URL parameters, none are required:
*
* index :: Which index to search? If this is specified, interval is set to 'none'
* pattern :: Does nothing if index is specified. Set a timestamped index pattern. Default: [logstash-]YYYY.MM.DD
@ocxo
ocxo / gist:ce376fb4ab3298392048
Created December 16, 2014 17:10
temporary hack to address bug with vagrant-vbguest installation on vagrant 1.7.1
# temporary hack to address bug with vagrant-vbguest installation
# https://github.com/mitchellh/vagrant/issues/4962
if awk "BEGIN {exit `vagrant -v` == "1.7.1" ? 0 : 1 }"
then
sudo sed -i .original 's/\*\*opts/opts/g' /opt/vagrant/embedded/gems/gems/vagrant-1.7.1/lib/vagrant/machine.rb
fi