Skip to content

Instantly share code, notes, and snippets.

View aussielunix's full-sized avatar
🤠
G`Day

Mick Pollard aussielunix

🤠
G`Day
View GitHub Profile
@aussielunix
aussielunix / gist:1515957
Created December 24, 2011 02:14
search all graylog2-elasticsearch
curl -XGET 'http://localhost:9200/graylog2/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'
@aussielunix
aussielunix / confluence4r.rb
Created January 20, 2012 06:52 — forked from ccaum/confluence4r.rb
Confluence Puppet Doc Generator
require 'xmlrpc/client'
# A useful helper for running Confluence XML-RPC from Ruby. Takes care of
# adding the token to each method call (so you can call server.getSpaces()
# instead of server.getSpaces(token)). Also takes care of re-logging in
# if your login times out.
#
# Usage:
#
# server = Confluence::Server.new :server => 'http://confluence02.lightningsoure.com'
@aussielunix
aussielunix / gist:1735236
Created February 4, 2012 04:06
sane rubygems on Ubuntu Lucid
The version of rubygems is too old in the Lucid repositories so I make use of a thirdparty PPA.
This PPA is from Mackenzie Morgan - a Ubuntu Developer - https://launchpad.net/~maco.m/+archive/ruby
1) add Mackenzie's PPA
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:maco.m/ruby
2) let apt see the new repositories
lunix@glenmorangie] -> cat .gitmodules
[submodule "bundle/syntastic"]
path = bundle/syntastic
url = git://github.com/scrooloose/syntastic.git
[submodule "bundle/puppet"]
path = bundle/puppet
url = git://github.com/rodjek/vim-puppet.git
[submodule "bundle/tabular"]
path = bundle/tabular
url = git://github.com/godlygeek/tabular.git
@aussielunix
aussielunix / .bashrc
Created February 6, 2012 10:13
easily serve current dir via ruby/webrick
# If you add the following to your ~/.bashrc you can the serve the contents of any directory with ruby/webrick on port 3000.
alias rs="ruby -rwebrick -e \"s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start\""
@aussielunix
aussielunix / .gitignore
Last active April 12, 2018 17:37
jenkins configs to github
*
!/.gitignore
!/*.xml
!/nextBuildNumber
!/jobs
!/jobs/*
!/jobs/*/*.xml
/jobs/*/disk-usage.xml
/jobs/*/builds
@aussielunix
aussielunix / rmd.sh
Created May 1, 2012 05:13
record my desktop
#!/bin/bash -e
if [ "$#" -eq 1 ]; then
SavePath=$1
else
SavePath=$(zenity --file-selection --save --confirm-overwrite --filename $HOME/personal/media/Videos/screencasts/incoming/ )
fi
echo "Saving video to $SavePath"
@aussielunix
aussielunix / vm-create.rb
Created May 8, 2012 13:38
create blank vsphere VM
#!/usr/bin/env ruby
require 'rubygems'
require 'pp'
require 'fog'
credentials = {
:provider => "vsphere",
:vsphere_username => "foo",
:vsphere_password=> "bar",
@aussielunix
aussielunix / Gemfile.md
Created May 11, 2012 08:07
bundler-puppet

Current

gem 'stdlib', :git => "https://github.com/puppetlabs/puppetlabs-stdlib.git"
gem 'apt', :git => "https://github.com/puppetlabs/puppet-apt.git"
gem 'mongodb', :git => "https://github.com/puppetlabs/puppetlabs-mongodb.git"

Future - wishlist

tell bundler we are working with puppet modules

node /^foo-app-\d+.example.net$/ {
roles:app_server { $fqdn:
collectd_client_report_to => 'foo-monitor-01.example.net',
syslog_client_report_to => 'foo-log-01.example.net'
}
roles:backup { $fqdn:
backupserver => 'backup-01.example.net',
}
}