Skip to content

Instantly share code, notes, and snippets.

View dmacvicar's full-sized avatar

Duncan Mac-Vicar P. dmacvicar

View GitHub Profile
init = Rails::Initializer.run do |config|
#...
end
# look for all existing loaded plugin's public/ directories
plugin_assets = init.loaded_plugins.map { |plugin| File.join(plugin.directory, 'public') }.reject { |dir| not (File.directory?(dir) and File.exist?(dir)) }
init.configuration.middleware.use MyApp::Rack::StaticOverlay, :roots => plugin_assets
#! /bin/sh
# by http://en.opensuse.org/User:Mvidner
# https://bugzilla.novell.com/show_bug.cgi?id=222757
usage() {
cat >&2 <<EOF
$0 version 0.2
Usage:
$0 --update ONE_NAME
$0 --remove ONE_NAME
$0 [--install [ONE_FILE]]
#
# Requires collectd to be configured with the unixsock plugin, like so:
#
# LoadPlugin unixsock
# <Plugin unixsock>
# SocketFile "/var/run/collectd-unixsock"
# SocketPerms "0775"
# </Plugin>
#
# Copyright (C) 2008 Clay Loveless <clay@killersoft.com>
# Ruby class to access collectd daemon through the UNIX socket
# plugin.
#
# Requires collectd to be configured with the unixsock plugin, like so:
#
# LoadPlugin unixsock
# <Plugin unixsock>
# SocketFile "/var/run/collectd-unixsock"
# SocketPerms "0775"
# </Plugin>
- llvm needs to be found and used if installed in /usr, /usr/local or configurable prefix.
(for example, if installed using packages, llvm binaries will be in /usr/bin and headers in /usr/include)
this is valid for all external libraries.
- make install needs to support DESTDIR. If prefix is set to /opt/rubinius at configure/build time, and make install is called with DESTDIR=/some/root, it should end installed in /some/root/opt/rubinius, this is used by packaging tools to find out which files belong to the package
- snapshots needs to be tagged with a sequencial release number. Even better if foo-x.x.tar.bz2 tarballs are offered from such milestones. That makes easier to build packages (no need to update a git checkout, and makes the package upgradeable)
- need to honor CFLAGS and CXXFLAGS passed from the environment. Distribution pass some standard platform compile flags.
# to install the gems:
# gem install icalendar
# or
# Add devel:languages:ruby:extensions
# zypper in rubygem-icalendar
require 'rubygems'
require 'icalendar'
require 'open-uri'
require 'date'
Name: google-talkplugin
Version: 1.4.1.0
Release: 0
Summary: Google Talk Plugin
Group: Productivity/Networking/Web/Browsers
License: Proprietary
%ifarch x86_64
Source0: google-talkplugin_current_amd64.deb
%define archsuffix 64
%else
bin/mspec ci --background --agent
rubinius 1.0.1 (1.8.7 6e7c8e82 2010-06-03 JI) [x86_64-unknown-linux-gnu]
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
From a76eba0bf3be09ac92ff949e695ed95c915bd33a Mon Sep 17 00:00:00 2001
From: Duncan Mac-Vicar P <dmacvicar@suse.de>
Date: Mon, 23 Aug 2010 23:49:46 +0200
Subject: [PATCH 1/3] implement rb_hash in the C API
---
vm/capi/hash.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/vm/capi/hash.cpp b/vm/capi/hash.cpp
CC st.c
CC emitter.c
CC implicit.c
CC syck.c
CC bytecode.c
LDSHARED syck.so
/home/duncan/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -S rake -r /space/git/rubinius/rakelib/ext_helper.rb -r /space/git/rubinius/rakelib/dependency_grapher.rb build:rbx
(in /space/git/rubinius/lib/ext/melbourne)
Building Melbourne for Rubinius
LDSHARED rbx/melbourne.so