Skip to content

Instantly share code, notes, and snippets.

💆‍♂
domakesaythink

Adam Ochonicki ocxo

💆‍♂
domakesaythink
Block or report user

Report or block ocxo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hangops-coc.md

All HangOps members are required to comply with the following code of conduct. HangOps admins will enforce this code within HangOps spaces.

The Short Version

Be respectful of other people; respectfully ask people to stop if you are bothered; and if you can’t resolve an issue contact the admins. If you are being a problem, it will be apparent and you may be asked to leave HangOps.

The Long Version

Respect

View incident.coffee
# 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) ->
View cross_account_iam.tf
# 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
View gist:5b306011ab5bf975da1735f6de635f4e
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "sock",
"host": {
"sourcePath": "/var/run/docker.sock"
}
},
{
View gist:ee120a50917a7152df874b2958459790
#! /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
View gist:e03c96108235b36e89a9
/*! 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
View gist:f39fa1891a6735d6cbc5
$ 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...
View gist:91ffdb118c314419a436
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)
View gist:9651546439d44ecfc0d5
$ cat logstash.json
{
"title": "Logstash Search",
"services": {
"query": {
"list": {
"0": {
"query": "{{ARGS.query || '*'}}",
"alias": "",
"color": "#7EB26D",
View gist:fa76dfd6d8ebdd367290
$ 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
You can’t perform that action at this time.