Skip to content

Instantly share code, notes, and snippets.

View jbouse's full-sized avatar

Jeremy T. Bouse jbouse

View GitHub Profile
@jbouse
jbouse / ecGetMembers.rb
Created August 17, 2012 15:56
Puppet parser function to return an array of AWS ElastiCache cluster nodes
require 'rubygems'
require 'fog'
module Puppet::Parser::Functions
newfunction(:ecGetMembers, :type => :rvalue) do |args|
raise(Puppet::ParseError, "ecGetMembers(): wrong number of arguments(#{args.length}; must be 1)") if args.size != 1
params = {}
@jbouse
jbouse / gpg.conf
Last active March 24, 2021 18:07
GnuPG configuration
# Options for GnuPG
# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@jbouse
jbouse / gist:1068614
Created July 6, 2011 23:43
pool.shares queries
SELECT username as address,
((COUNT(*) * POW(2,32))/900) as hashrate
FROM shares
WHERE our_result <> 'N'
AND UNIX_TIMESTAMP(time) BETWEEN (UNIX_TIMESTAMP(NOW())-900)
AND UNIX_TIMESTAMP(NOW())
GROUP BY address;
SELECT username as address,
((COUNT(*) * POW(2,32))/10800) as hashrate