Skip to content

Instantly share code, notes, and snippets.

## Ruby Enterprise Edition 1.8.7 on Mac OS X Snow Leopard
# Install readline 6.0. Might not be necessary.
curl -O ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz
tar xzvf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make
sudo make install
@andreimaxim
andreimaxim / scheduler.rb
Created October 29, 2009 21:03
Un mini-scheduler scris in Ruby pentru a rula task-uri in paralel.
## Ruleaza bucati de Ruby pe un numar maxim de thread-uri
#
# Utilizare:
#
# runner = Scheduler.new :max_threads => 20
# ary.each { |item| runner.queue { stuff_to_do_in_paralel } }
# runner.start
#
# Codul este complet netestat.
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2009.10
Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl
Packager: Adam Vollrath <adam@endpoint.com>
Version: 1.8.7
Release: 2%{dist}
License: GPL
%define RELEASE 2010.01
Summary: Ruby Enterprise Edition (Release %{RELEASE})
Name: ruby-enterprise
Vendor: Phusion.nl
Version: 1.8.7
Release: %{RELEASE}
License: GPL
Group: Development/Languages
URL: http://www.rubyenterpriseedition.com/
Summary: Ruby Enterprise Edition
Name: ruby-enterprise
Vendor: Phusion.nl
Version: 1.8.7
Release: 2010.01
License: LGPL
Group: Development/Languages
URL: http://www.rubyenterpriseedition.com/
Source0: %{name}-%{version}-%{release}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Summary: Fast, multi-threaded malloc() and nifty performance analysis tools
Name: google-perftools
Vendor: Google
Version: 1.5
Release: 1%{?dist}
License: BSD
Group: Development/Tools
URL: http://code.google.com/p/google-perftools/
Source0: google-perftools-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Summary: RubyGems is the premier ruby packaging system
Name: rubygems
Version: 1.3.6
Release: 1%{?dist}
License: Ruby
Group: Development/Libraries
URL: http://rubyforge.org/projects/rubygems/
Source0: %{name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: ruby >= 1.8.6
APP_ROOT = File.dirname(File.expand_path(__FILE__))
CONFIG_FILE = File.join(APP_ROOT, "db", "config.yml")
MIGRATIONS_DIR = File.join(APP_ROOT, "db", "migrate")
namespace :db do
require "activerecord"
task :environment do
config = YAML.load_file(CONFIG_FILE)
<script type="text/javascript">
var _timer = setInterval(function() {
if (/loaded|complete/.test(document.readyState)) {
clearInterval(_timer);
var links = document.getElementsByTagName('a');
for(i = 0; i < links.length; i++)
links[i].removeAttribute("target");
}
}, 10);
(function () {
if (window.fluid) {
var NoTargets = {
FRAMES: [],
getFrames: function () {
var _timer = setInterval(function () {
if(/complete/.test(document.readyState)) {
clearInterval(_timer);