Skip to content

Instantly share code, notes, and snippets.

View mvz's full-sized avatar

Matijs van Zuijlen mvz

View GitHub Profile
@mvz
mvz / repro-rbx-platform-issue.sh
Created December 23, 2013 16:18
Script to reproduce problem where :rbx platform seems to be ignored by Bundler
#!/bin/bash
set -ex
mkdir -p /tmp/repro-rbx-platform-issue
cd /tmp/repro-rbx-platform-issue
bundle env
# Bundler 1.3.5
# Ruby 2.0.0 (2013-11-22 patchlevel 353) [x86_64-linux-gnu]
@mvz
mvz / mdv.rb
Created April 17, 2012 08:11
Dead-simple Markdown Viewer
#!/usr/bin/env ruby
require 'ffi-gtk3'
require 'github/markup'
GirFFI.setup :WebKit, '3.0'
Gtk.init
WebKit.set_cache_model :document_viewer
@mvz
mvz / 0001-Explicitely-define-GLib.strv_get_type.patch
Created February 28, 2012 10:49
Patch to hopefully make gir_ffi 0.2.3 work on Ubuntu 11.04
From 61f55004a7ca5bc56448babd2979cd81877e6144 Mon Sep 17 00:00:00 2001
From: Matijs van Zuijlen <matijs@matijs.net>
Date: Tue, 28 Feb 2012 11:01:48 +0100
Subject: [PATCH] Explicitely define GLib.strv_get_type.
On older GLibs, this function is not yet properly introspected.
---
lib/ffi-glib.rb | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Rubinius Crash Report #rbxcrashreport
Error: signal SIGSEGV
[[Backtrace]]
bin/rbx[0x57af5c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf020)[0x7fddf6c3c020]
bin/rbx(_ZN8rubinius11InlineCache19update_and_validateEPNS_2VMEPNS_9CallFrameEPNS_6ObjectE+0x2c)[0x5851bc]
bin/rbx(rbx_check_serial+0x24)[0x713e04]
[0x7fddf0097a2d]
@mvz
mvz / gem_improved_cleanup.rb
Created May 27, 2011 06:48
Improved gem cleanup: ignores Rails, tries to avoid user interaction.
#!/usr/bin/env ruby
require 'rubygems'
require 'rubygems/user_interaction'
require 'rubygems/uninstaller'
# New RubyGems?
#specs = Gem::Specification.find_all_by_name do |s|
# s.name != "rails"
#end