Skip to content

Instantly share code, notes, and snippets.

@felixbuenemann
felixbuenemann / em-108-arm-kqueue-writer-failed-testcase.rb
Last active Aug 28, 2015
Testcase to reproduce kqueue crash with thin on eventmachine 1.0.8
View em-108-arm-kqueue-writer-failed-testcase.rb
#!/usr/bin/env ruby
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
View rubymetrics-rake-1.8.0.patch
diff --git a/pom.xml b/pom.xml
index 0ee28a9..320c0c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,9 +49,9 @@
</dependency>
<dependency>
- <groupId>org.jvnet.hudson.plugins</groupId>
+ <groupId>org.jenkins-ci.plugins</groupId>
View uuid_generator.rb
# encoding: utf-8
# Simple UUID Generator for UUID v0 (zero padded), v1, v2, v3, v4, v5
# Author: Felix Buenemann https://github.com/felixbuenemann/
# License: Public Domain
# Note: v1 code partially based on these ruby uuid implementations:
# https://github.com/assaf/uuid/
# https://github.com/cassandra-rb/simple_uuid
require 'digest/md5'
require 'digest/sha1'
require 'securerandom'
View dv-acts_as_tree-patch-1-rails3x-fix.patch
diff --git a/lib/acts_as_tree.rb b/lib/acts_as_tree.rb
index 3279d87..1395481 100644
--- a/lib/acts_as_tree.rb
+++ b/lib/acts_as_tree.rb
@@ -240,7 +240,7 @@ module ActsAsTree
# subchild1.leaf? # => true
# child1.leaf? # => false
def leaf?
- children.empty?
+ children.size == 0
View rails-4.1-postgres-opclass.patch
diff -ur activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
--- activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb 2014-07-11 02:35:32.000000000 +0200
+++ activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb 2014-07-11 01:31:14.000000000 +0200
@@ -8,7 +8,7 @@
# Abstract representation of an index definition on a table. Instances of
# this type are typically created and returned by methods in database
# adapters. e.g. ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter#indexes
- class IndexDefinition < Struct.new(:table, :name, :unique, :columns, :lengths, :orders, :where, :type, :using) #:nodoc:
+ class IndexDefinition < Struct.new(:table, :name, :unique, :columns, :lengths, :orders, :where, :type, :using, :opclass) #:nodoc:
end
View serialized_binary_column_changes_bug.rb
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'i18n', github: 'svenfuchs/i18n'
gem 'sqlite3'
GEMFILE
View inspeqtor-unauth-smtp-hack.patch
diff --git a/actions.go b/actions.go
index 93cb126..69a4235 100644
--- a/actions.go
+++ b/actions.go
@@ -179,11 +179,18 @@ func sendEmail(e *EmailNotifier, doc bytes.Buffer) error {
} else {
util.Debug("Sending email to %s", e.To)
util.Debug("Sending email:\n%s", string(doc.Bytes()))
- auth := smtp.PlainAuth("", e.Username, e.Password, e.Host)
- err := smtp.SendMail(e.Host+":587", auth, e.From,
View rails-418-issue-15920-arel-regression.rb
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.8'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
View railscasts.vim
" Vim color scheme
"
" Name: railscast.vim
" Maintainer: Josh O'Rourke <joshorourke@me.com>
" License: public domain
"
" A GUI Only port of the RailsCasts TextMate theme [1] to Vim.
" Some parts of this theme were borrowed from the well-documented Lucius theme [2].
" Ported for 256 color console vim by Felix Buenemann <felix.buenemann@gmail.com>
"
View pg_dump_matview_inlining_bug.sql
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
You can’t perform that action at this time.