Skip to content

Instantly share code, notes, and snippets.


Johannes Barre iGEL

  • BillFront
  • Berlin, Germany
View GitHub Profile
View Dockerfile
FROM debian
RUN apt-get update && apt-get install -y --no-install-recommends chromium
CMD chromium --headless --verbose --no-sandbox --screenshot
iGEL / check_out.clj
Last active Mar 5, 2020
Clojure version of the tests for Kata 09
View check_out.clj
;; This is an adapted version of the tests from for Clojure
;; Original version by Dave Thomas
;; Run it like this:
;; lein exec check_out.clj
;; # or with Docker:
;; docker run -v `pwd`:`pwd` -w `pwd` clojure:alpine lein exec check_out.clj
(ns check-out.core
(:require [clojure.test :refer [is are deftest testing run-tests]]
iGEL / script.rb
Last active Feb 6, 2018
Bringt uns die Zeitumstellung mehr Sonnenlicht?
View script.rb
require 'sun_times'
# 1. Install ruby
# 2. gem install ruby-sun-times
# 3. ruby sun.rb
def f(t)
iGEL /
Last active Jan 30, 2018
Enforce terraform workspaces can be only applied from a certain branch
# Source:
# Fails if the user is currently not on the configured branch in git.
# Output doesn't matter, only that it succeeds (exit status 0).
# Current terraform version: v0.11.2
data "external" "enforce_workspace" {
program = ["./git-branch"]
query = {
View call_without_parens.diff
diff --git a/spec/rubocop/cop/style/lambda_call_spec.rb b/spec/rubocop/cop/style/lambda_call_spec.rb
index abbd89c..93d37b9 100644
--- a/spec/rubocop/cop/style/lambda_call_spec.rb
+++ b/spec/rubocop/cop/style/lambda_call_spec.rb
@@ -61,5 +61,15 @@ describe RuboCop::Cop::Style::LambdaCall, :config do
new_source = autocorrect_source([''])
expect(new_source).to eq('a.(x)')
+ it 'auto-corrects to x.()' do
iGEL / mail_patch.rb
Created Mar 3, 2017
Safe monkey patched mail 2.6.4 deprecation warnings for Ruby 2.4
View mail_patch.rb
# frozen_string_literal: true
unless Mail::VERSION.version == "2.6.4"
raise "Please delete #{__FILE__}, it's not required anymore"
# This file monkey patches away the new deprecation warnings from Ruby 2.4.
# Lifted here:
# *
# *

Keybase proof

I hereby claim:

  • I am igel on github.
  • I am igelei ( on keybase.
  • I have a public key ASDx5e08AAwZryDHFw8SUstrqXo7r9JFyYuYES17Xmqw2Ao

To claim this, I am signing this object:

iGEL / webmock_curl.rb
Last active Sep 9, 2015
Patch WebMock to print the curl command on disabled net connect. Just copy & paste it to execute.
View webmock_curl.rb
module WebMock
class NetConnectNotAllowedError < Exception
alias_method :stubbing_instructions_without_curl, :stubbing_instructions
def stubbing_instructions(request_signature)
iGEL / check_out_spec.rb
Last active Jan 10, 2019
RSpec version of the tests for Kata 09
View check_out_spec.rb
# This is a reimplementation of the tests of this kata:
# Original implementation by Dave Thomas
RSpec.describe CheckOut do
let(:rules) { } # Define your rules here!
it 'incremential scanning on the same bill' do
checkout =