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
#!/usr/bin/env ruby
require 'rubygems'
require 'pp'
require 'fog'
require 'highline/import'
def get_password(prompt="Enter password:")
ask(prompt) {|q| q.echo = false}
end
# Variables goes hither
declare -a FILES
IFS="
"
FILES=$(git diff --cached --name-only --diff-filter=ACM )
# I we don't have puppet-lint, so just exit and leave them be.
which puppet-lint >/dev/null 2>&1 || exit
# I we don't have puppet, so just exit and leave them be.
which puppet >/dev/null 2>&1 || exit
@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 / httparty.rb
Created December 17, 2011 00:52 — forked from runemadsen/httparty.rb
Creating a repo via the Github API and HTTParty
class Github
include HTTParty
base_uri 'https://api.github.com'
end
Github.post("/user/repos", :query => {
:access_token => @token
},
:body => {
:name => name,
@aussielunix
aussielunix / linux_proc_name.rb
Created November 22, 2011 11:39 — forked from eric/linux_proc_name.rb
Update a process name in linux to change how it shows up in top and lsof
#
# Eric Lindvall <[email protected]>
#
# Update the process name for the process you're running in.
#
# This will allow top, lsof, and killall to see the process as the
# name you specify.
#
# Just use:
#