Skip to content

Instantly share code, notes, and snippets.

View benlangfeld's full-sized avatar

Ben Langfeld benlangfeld

View GitHub Profile
FROM ruby:3.3.0-bullseye
RUN gem install bundler -v 2.5.4 && gem update --system 3.5.4
ADD Gemfile Gemfile.lock /
RUN gem install rails --version 7.1.2 && gem list rails
RUN bundler lock --patch --strict --update rails
RUN cat Gemfile.lock && exit 1
FROM ruby:3.3.0-bullseye
RUN gem install bundler -v 2.5.4 && gem update --system 3.5.4
ADD Gemfile Gemfile.lock /
RUN bundler lock --patch --strict --update playbook_ui
@benlangfeld
benlangfeld / plugin.yml
Created January 31, 2022 16:08
To get the ability to quickly pause and unpause PXC clusters running on Kubernetes using the k9s terminal GUI, place the following file at the configuration directory reported by `k9s info`.
plugin:
pxc_pause:
shortCut: p
confirm: true
description: Pause cluster
scopes:
- perconaxtradbclusters
command: kubectl
background: false
args:
ruby 3.0.3
include_recipe 'adam_snark_rabbit::base'
docker_image 'quay.io/mojolingo/adam_xmpp_server' do
tag node['adam']['repo']['tag']
cmd_timeout 1000
notifies :redeploy, 'docker_container[adam_xmpp_server]', :immediately
end
docker_container 'adam_xmpp_server' do
image 'quay.io/mojolingo/adam_xmpp_server'

Keybase proof

I hereby claim:

  • I am benlangfeld on github.
  • I am benlangfeld (https://keybase.io/benlangfeld) on keybase.
  • I have a public key whose fingerprint is 181D 7230 C198 2F01 D975 1710 F0C0 7D7B 2AC4 F268

To claim this, I am signing this object:

diff --git a/lib/blather/client/client.rb b/lib/blather/client/client.rb
index 6c7fe4e..9e8350b 100644
--- a/lib/blather/client/client.rb
+++ b/lib/blather/client/client.rb
@@ -184,11 +184,7 @@ module Blather
# @private
def receive_data(stanza)
- if handler_queue
- handler_queue << stanza
def music_on_hold
output = play! "/path/to/music.wav", :repeat_times => 0
hid = call.on_joined do
output.stop! if output.executing?
end
begin
yield.tap do
output.stop! if output.executing?
@benlangfeld
benlangfeld / gist:8359019
Created January 10, 2014 17:45
How not to implement nested exceptions in Ruby
class FooException < StandardError
end
class BarException < StandardError
attr_reader :exception
def initialize(exception)
@exception = exception
end
end
require 'formula'
class Iksemel < Formula
homepage 'http://code.google.com/p/iksemel/'
url 'https://iksemel.googlecode.com/files/iksemel-1.4.tar.gz'
version '1.4'
depends_on 'gnutls'
def install