Skip to content

Instantly share code, notes, and snippets.

View briancain's full-sized avatar
🌀

Brian Cain briancain

🌀
View GitHub Profile
@briancain
briancain / output
Created July 13, 2013 18:24
Bug #21530 cfpropertylist .to_plist method doesn't output Apple standard XML format
facter/ ruby -r facter -r facter/util/plist -e "p = {'foo'=>'bar', 'baz'=>[1,2,3]}.to_plist(); puts p"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>baz</key>
<array>
<integer>1</integer>
<integer>2</integer>
<integer>3</integer>
@briancain
briancain / output for facter 1.7.1
Created July 13, 2013 18:49
Bug #21530 cfpropertylist .to_plist method doesn't output Apple standard XML format part 2
facter/ facter --version ±[1.7.1^0]
1.7.1
facter/ ruby -r facter -r facter/util/plist -e "p = {'foo'=>'bar', 'baz'=>[1,2,3]}.to_plist(); puts p" ±[1.7.1^0]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>baz</key>
<array>
<integer>1</integer>
@briancain
briancain / gatling-config.json
Last active December 21, 2015 04:09
Example Puppet Gatling configuration
{
"master": "master.localdomain",
"sbtpath": "/usr/local/Cellar/sbt/0.12.4/libexec/sbt-launch.jar",
"steps": [
{"install": "pe28"},
{"simulate": {
"id": "PE28_bigcatalog_plus_vanilla",
"puppet_version": "pe28",
"scenario": {
"run_description": "PE28BigCatalogPlusVanillaCent5",
@briancain
briancain / help.txt
Last active July 25, 2016 12:46
Trollbot Help Commands
17:27 < Trollbot2> !buzzword - Returns a random buzzword
17:27 < Trollbot2> !proof - Returns a random proof
17:27 < Trollbot2> <name>++
17:27 < Trollbot2> <name>--
17:27 < Trollbot2> Events:
17:27 < Trollbot2> N/A
17:27 < Trollbot2> deal with it - display a "deal with it" gif
17:27 < Trollbot2> Trollbot2 <user> doesn't have <role> role - Removes a role from a user
17:27 < Trollbot2> Trollbot2 <user> has <role> role - Assigns a role to a user
17:27 < Trollbot2> Trollbot2 <user> is a badass guitarist - assign a role to a user
@briancain
briancain / brian.zsh-theme
Last active August 29, 2015 13:56
My custom theme for oh-my-zsh
# Display user and host in prompt
local user_host='%{$terminfo[bold]$fg[blue]%}%n@%m%{$reset_color%}'
# Build left hand prompt
PROMPT="${user_host}:%{$fg_bold[green]%}%p%{$fg[cyan]%}%c%{$reset_color%} $ "
# rvm development
# local rvm_ruby=''
# if which rvm-prompt &> /dev/null; then
# rvm_ruby='%{$fg[red]%}[$(rvm-prompt i v g)]%{$reset_color%}'
@briancain
briancain / compilereport.sh
Last active August 29, 2015 13:57
compile latex
#! /bin/bash
# Brian Cain
#
# Stop wasting your time with
# pdflatex and bibtex. Just
# run this script.
# Don't forget to change REPORT_NAME
@briancain
briancain / issue.md
Last active August 29, 2015 13:58
Potential issues with ancor

After I did an environment remove, ANCOR still had instances and roles (potentially other things) left over in the database. Shouldn't this endpoint clean up these left over values in mongo?

This was discovered after I redeployed a new environment. ANCOR said I had 22 instances.

roles leftover? duplicate roles

vagrant@ancor-precise64:/vagrant$ ancor role list
  +--------------------------+------------+-------------------------------+-----+-----+
  | id                       | slug       | name                          | min | max |
@briancain
briancain / keybase.md
Created April 8, 2014 16:48
Keybase auth

Keybase proof

I hereby claim:

  • I am briancain on github.
  • I am briancain (https://keybase.io/briancain) on keybase.
  • I have a public key whose fingerprint is 735C 39F6 4136 A7E8 538A DBD4 F582 FE9C 4DDE FD10

To claim this, I am signing this object:

@briancain
briancain / woot.md
Last active August 29, 2015 14:00
GithubGist bug?

Is this going to break GithubGist??

  • yes
  • no
  • maybe
# this works in puppet-acceptance/
# Puppet Open Source Tests
# debug
# time ./systest.rb --type manual --no-install --debug --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# non-debug
# time ./systest.rb --type manual --no-install --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# Puppet Enterprise run tests
# Debug
# time ./systest.rb --type pe --no-install --debug --ntp --config ../conf/cent6mda-cent5a.cfg --helper ../puppetdb/acceptance/helper.rb --options-file ../puppetdb/acceptance/options/postgres.rb --setup ./foo -t ../puppetdb/acceptance/setup/pre_suite/00_setup_test_env.rb --tests $@
# Single node