Skip to content

Instantly share code, notes, and snippets.

View jbouse's full-sized avatar

Jeremy T. Bouse jbouse

View GitHub Profile
@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
@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 / 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 = {}
#!/usr/bin/env ruby
# Copyright 2014 Jeremy T. Bouse
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jbouse
jbouse / puppet-apply
Created February 5, 2014 18:54
interpolation example
jbouse@jbouse:~$ puppet apply test.pp --verbose
Notice: Scope(Set_password[passwd1]): passwd1 .x/5FQ/
Notice: Scope(Set_password[passwd2]): passwd2 $1$RCxCmL.x$MRHrLKqYpha19ERGC/5FQ/
Notice: Compiled catalog for jbouse.example.com in environment production in 0.06 seconds
Info: Applying configuration version '1391626332'
Notice: Finished catalog run in 0.40 seconds
@jbouse
jbouse / -
Last active August 29, 2015 14:01 — forked from anonymous/-
case $::hostname {
/^gphapaadm(2|3|4|5|6|7)$/ : {
$els_host = 'elsvipprd1.ddtc.cmgdigital.com'
$els_port = '9200'
$gph_host = 'graphite2.ddtc.cmgdigital.com'
$gph_port = '80'
}
default : { fail("elasticsearch host not set been for ${::hostname} in graphite::webapp") }
}
'''
@author Bommarito Consulting, LLC
@date 20120622
Identify and, if requested, remove orphaned snapshots from an EC2 account.
'''
# Imports
import boto
@jbouse
jbouse / Vagrantfile
Last active August 29, 2015 14:10 — forked from Sharpie/Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.5 or newer and three plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.1.4
# vagrant plugin install vagrant-auto_network ~> 1.0.0
# vagrant plugin install vagrant-vbguest ~> 0.10.0
#
# After installation, the following steps will spin up a master and agent that
@jbouse
jbouse / jdk.sls
Last active August 29, 2015 14:18
{% from "map.jinja" import map with context %}
jdk:
cacert: {{ map.cacert }}
@jbouse
jbouse / mkhomedir
Last active August 1, 2021 06:21
SSSD AD integration notes
Name: Create home directory during login
Default: yes
Priority: 0
Session-Interactive-Only: yes
Session-Type: Additional
Session-Final:
required pam_mkhomedir.so skel=/etc/skel umask=0022