Skip to content

Instantly share code, notes, and snippets.

Mike Gunderloy ffmike

Block or report user

Report or block ffmike

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rabbitmq.config
[
{kernel, [
]},
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"***.pem"},
{certfile,"***.pem"},
{keyfile,"***.pem"},
{verify,verify_none},
View keybase.md

Keybase proof

I hereby claim:

  • I am ffmike on github.
  • I am ffmike (https://keybase.io/ffmike) on keybase.
  • I have a public key ASDa5D_VWxS_a1bQU2Ya8lSExV2ryfownP8u04u0nCNi1go

To claim this, I am signing this object:

View bpl_trolls.user.js
// ==UserScript==
// @name Hide BPL Trolls
// @namespace ffmike
// @description Hide forum postings from particular users on BPL
// @include http://www.backpackinglight.com/cgi-bin/backpackinglight/forums/thread_display.html
// @version 1
// @license CC0 1.0; https://creativecommons.org/publicdomain/zero/1.0/
// ==/UserScript==
// Shamelessly based on https://greasyfork.org/en/scripts/48-maximumpc-troll-remover/code
View yaya
List id 248 name list_type House Wine
created_at 2012-05-29 10:59:57 -0700 updated_at 2013-10-12 17:28:38 -0700
beverage_sku_list_items
---------------------------------------------------------------------------------------
id ordinal beverage_sku_id beverage_sku_list_id beverage_sku_list_group_id
---------------------------------------------------------------------------------------
Red
62576 38 32312 (A) 248 (W) 3004(Sommelier's Featured) Cade "Napa Cuvé 2009 Caber Bottle
201828 39 116697 (A) 248 (W) 3004(Sommelier's Featured) Cellar Can Blau 2009 Syrah Bottle
46469 40 22795 (A) 248 (W) 3004(Sommelier's Featured) Jordan 2009 Caber Bottle
@ffmike
ffmike / ungrouped.txt
Created Sep 5, 2013
Ungrouped headers with bevs
View ungrouped.txt
1515 Restaurant Ungrouped Spirits 10
4th Street Vine Ungrouped Sparkling Wines 4
4th Street Vine Ungrouped White Wines 16
4th Street Vine Ungrouped Rosé Wines 2
4th Street Vine Ungrouped Red Wines 22
4th Street Vine Ungrouped Spirits 14
A Restaurant Ungrouped Rosé Wines 2
ALC Steaks Ungrouped Sparkling Wines 1
Aura Brasserie Ungrouped Spirits 1
Aureole at Mandalay Bay Resort and Casino Ungrouped White Wines 1
View irb.txt
1.9.3p374 :005 > YAML.load('---\nid: 90196\nrestaurant_id: 160\n')
---\nid: 90196\nrestaurant_id: 160\n
Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 1 column 30
@ffmike
ffmike / gist:6212643
Created Aug 12, 2013
Capybara select 2 testing
View gist:6212643
# Loosely based on https://github.com/goodwill/capybara-select2
module Capybara
module Select2
def select2(value, options = {})
raise "Must pass a hash containing 'from'" if not options.is_a?(Hash) or not options.has_key?(:from)
select_name = options[:from]
select2_container=first("label", text: select_name).find(:xpath, '..').find(".select2-container")
select2_container.find(".select2-choice").click
View staging2.txt
deployer@staging02:/www/tastevin-web/releases/20130717155956$ cd /www/tastevin-web/releases/20130717160805
deployer@staging02:/www/tastevin-web/releases/20130717160805$ ls
app bin Capfile circle.yml config config.ru db doc Gemfile Gemfile.lock lib mysql2pgsql.yml public Rakefile REVISION script test
deployer@staging02:/www/tastevin-web/releases/20130717160805$ bundle install --gemfile /www/tastevin-web/releases/20130717160805/Gemfile --path /www/tastevin-web/shared/bundle --deployment --without development test
Fetching source index from http://rubygems.org/
Using rake (10.1.0)
Using i18n (0.6.4)
Using minitest (4.7.5)
Using multi_json (1.7.7)
Using atomic (1.1.10)
@ffmike
ffmike / callbacks.rb
Last active Jul 9, 2019
Callback logging
View callbacks.rb
# With thanks to https://github.com/optoro/activerecord-callback_notification for original inspiration
if Rails.env.development?
module ActiveRecord
module CallbackNotifications
extend ActiveSupport::Concern
module ClassMethods
def notify_all_callbacks
# Make sure all models are loaded before trying to enumerate
@ffmike
ffmike / stats_controller.rb
Last active Dec 16, 2015
Rails method to output JSON suitable for Panic Status Board graph NOTE: Title attribute must be a string
View stats_controller.rb
def hourly
stats = Stat.hourly(params[:stat_type])
respond_to do |format|
format.json do
datapoints = []
stats.each do |stat|
datapoints << {:title => stat.hour.to_s, :value => stat.event_count}
end
datasequences = [
{
You can’t perform that action at this time.