Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Set Graphite host
GRAPHITE=graphite.sjc1.sendgrid.net
GRAPHITE_PORT=2003
# Loop forever
while :
do
# Get epoch
root@contactriak0001t1mdw1 certs]# cat /etc/riak/advanced.config
[
{riak_core,
[
{ssl_enabled, true },
%% The cluster manager will listen for connections from remote
%% clusters on this ip and port. Every node runs one cluster
%% manager, but only the cluster manager running on the
%% cluster_leader will service requests. This can change as nodes
%% enter and leave the cluster.
@logikal
logikal / config.json
Last active August 29, 2015 14:14 — forked from anonymous/config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#f7941e",
"@brand-success": "#5cb85c",
### Keybase proof
I hereby claim:
* I am logikal on github.
* I am logikal (https://keybase.io/logikal) on keybase.
* I have a public key whose fingerprint is 4AA7 1915 C6EE E036 8E65 F4AF 2A9D 8844 0180 009A
To claim this, I am signing this object:
@logikal
logikal / running-config.txt
Created July 10, 2015 22:55
vEOS configuration - rbeapi doesn't support trunk groups
switch2#show running-config
! Command: show running-config
! device: switch2 (vEOS, EOS-4.15.0F)
!
! boot system flash:/vEOS-lab.swi
!
transceiver qsfp default-mode 4x10G
!
hostname switch2
!
@logikal
logikal / rabbitmq_outline.md
Last active August 29, 2015 14:25
RabbitMQ talk
  • RabbitMQ
    • A Young Lady's Primer on Distributed Queueing
      • Concepts
        • Publishers
        • Consumers
        • The queue
      • "Networks" or "Why god hates you, and everything you think you know is wrong"
        • Exactly Once Delivery
        • More-than Once Delivery
  • Less-than Once Delivery
@logikal
logikal / overviewer-config.py
Created March 20, 2012 05:27
Overviewer POI issues
# Marker definitions
def homeFilter(poi):
"Homes"
return poi[id] == 'Sign' and (\
'.' in poi['Text1'])
def signFilter(poi):
"All signs"
return poi['id'] == 'Sign'
consul:
image: progrium/consul
name: consul
ports:
- "8500:8500"
- "53:53/udp"
command: -server -bootstrap -ui-dir /ui
registrator:
image: progrium/registrator
@logikal
logikal / get_chef_env.rb
Last active December 12, 2015 23:29
Get your Chef environment back to a pretty-printed hash. e.g. for use with vagrant.
require 'JSON'
require 'Chef'
require 'pp'
# Probably a better way to shell out, this was quick
# Interestingly, this gets typed out as a Chef::Environment, so you have to require 'Chef'
environment = JSON.parse(`knife environment show environmentname -Fj`)
# Pretty print your environment's hash.
# Suitable for use with vagrant!
@logikal
logikal / chef11-vagrant.md
Last active December 14, 2015 06:49
Chef 11 has come out, and possibly broken a bunch of your carefully crafted cookbooks. How are you going to test them, though? Here's one way, using chef-solo via Vagrant.

Requirements

  • RVM (or rbenv, but this will use RVM)
  • You're using RVM or rbenv to manage your rubies, right? If not, you should be.
  • Virtualbox
  • some cookbooks you wrote and want to test

Set it up

We don't want to mess up our carefully crafted Chef 10.x environment, right? We'll use rvm gemsets to make a disposable set of gems. If something goes wrong, just close the terminal you're in, or run rvm gemset use default. You'll drop back to the default gemset.