Skip to content

Instantly share code, notes, and snippets.

Matijs van Zuijlen mvz

View GitHub Profile
mvz / gtg-export.rb
Created Jun 6, 2018
Export Getting Things Gnome tasks to Taskwarrior
View gtg-export.rb
#!/usr/bin/env ruby
require 'happymapper'
require 'json'
class Task
include HappyMapper
attribute :id, String
attribute :status, String
mvz / habtm_failure_active_record_4_2_8.rb
Created Apr 24, 2017
Assigning ids for HABTM relation can't handle duplicates in ActiveRecord 4.2.8
View habtm_failure_active_record_4_2_8.rb
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
gemfile(true) do
source ""
# Activate the gem you are reporting the issue against.
mvz / Dockerfile
Created Mar 5, 2017
Demonstration of bundler issue with nested bundle exec combined with openssl
View Dockerfile
# Reproduction of nested call bug with bundler 1.14.6
FROM ruby:2.4.0
RUN gem update openssl
RUN mkdir bbug
RUN gem install bundler --version '1.14.6'
RUN echo "#!/usr/bin/env ruby\nrequire 'openssl'\np OpenSSL::VERSION" > a.rb
RUN touch Gemfile
mvz / Dockerfile
Last active Mar 1, 2017
Reproduction of openssl issue with Bundler 1.14.5
View Dockerfile
# Reproduction of with bundler 1.14.5
FROM ruby:2.4.0
RUN apt-get update
RUN apt-get install -y nodejs
RUN gem update openssl
RUN gem install rails
RUN rails new bbug
RUN echo "gem 'cucumber-rails', group: :test, require: false" >> Gemfile
set -ex
mkdir /tmp/repro-5430
cd /tmp/repro-5430
bundle env
cat > Gemfile <<EOF
mvz / config.rb
Created Aug 28, 2016
Compiling rbx needs -latomic on Debian Unstable
View config.rb
module Rubinius
config = {}
config[:config_file] = "/home/matijs/src/rubinius-3.56/config.rb"
config[:command_line] = ["--prefix=/home/matijs/.rbenv/versions/rbx-3.56", ""]
config[:build_make] = "make"
config[:build_rake] = "rake"
config[:build_perl] = "perl"
config[:llvm_path] = nil
config[:llvm_system_name] = nil
config[:llvm_configure] = "/usr/bin/llvm-config"
mvz / ruby-build-1-9-debian.patch
Created Dec 4, 2015
Combined patches to get MRI 1.9.3 to build on Debian Sid
View ruby-build-1-9-debian.patch
From 1e7a929c1d44d7a368fbe379211183ac6c972920 Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Wed, 25 Dec 2013 01:42:09 +0000
Subject: [PATCH] ossl_ssl.c: declare OP_MSIE_SSLV2_RSA_PADDING only if defined
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant
`OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined. The
`SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest
snapshot of OpenSSL 1.0.1. [Fixes GH-488]

Keybase proof

I hereby claim:

  • I am mvz on github.
  • I am mvz ( on keybase.
  • I have a public key whose fingerprint is CA1C F616 6060 467D 107C 4ABC 9679 0921 5E73 C9DF

To claim this, I am signing this object:

mvz / block_binding.rb
Created Oct 20, 2014
JRuby binding issue
View block_binding.rb
class C
def block_param &blk
@foo = 2
p instance_eval &blk
@foo = 1
View spec_helper.rb
RSpec.configure do |config|
config.after(:each) do
next if RSpec::Matchers.last_should
result = self.example.metadata[:execution_result]
next if result[:exception] || result[:pending_message]
next if { proxies }.any?
raise "No expectations found in example at #{self.example.location}"
You can’t perform that action at this time.