Public Gists by kennethkalmer

Gravatar
Sun Nov 22 11:32:43 -0800 2009
1
require 'blather'
Gravatar
Wed Nov 18 05:09:36 -0800 2009
1
2
3
var proc_rep = ["define",{"name":"foo"},[["sequence",{},[["participant",{"activity":"Foo","ref":"nada"},[]]]]]];
4 FluoCan.renderFlow( 'fluo', proc_rep, { 'workitems' : ['0_0_0'] } );
5 FluoCan.crop('fluo');
Gravatar
Tue Oct 13 13:57:06 -0700 2009
1
2
3
# Pseudo class
class SearchResult < ActiveRecord::Base
  has_no_table
Gravatar
Wed Oct 07 10:12:18 -0700 2009
1
2
3
require 'rubygems'
require 'activerecord'
 
Gravatar
Wed Sep 30 14:46:35 -0700 2009
1
2
3
    # Ensure the AMQP connection is started
    def start!
      return if started?
Gravatar
Tue Sep 15 15:11:34 -0700 2009
1
2
3
require 'rubygems'
require 'mq'
 
Gravatar
Tue Sep 15 14:46:02 -0700 2009
1
2
3
DaemonKit::AMQP.run do
  # Inside this block we're running inside the reactor setup by the
  # amqp gem. Any code in the examples (from the gem) would work just
Gravatar
Tue Sep 15 09:37:44 -0700 2009
1
2
3
require 'rubygems'
require 'mq'
 
Gravatar
Fri Sep 11 01:10:51 -0700 2009
1
2
3
function(doc) {
  if(doc.type && doc.type == 'Email' && doc.unread == '1') {
    emit( doc.recipient, 1 )
Gravatar
Mon Aug 17 15:31:37 -0700 2009
1
2
3
# multithreaded daemon example
#
#
Gravatar
Fri Aug 14 11:21:16 -0700 2009
1
2
3
class CrazyIdea < OpenWFE::ProcessDefinition
  sequence do
    _loop :break_if => "${f:completed}" do
Gravatar
Fri Jul 31 11:05:14 -0700 2009
1
2
3
#
# daemon-kit stack configuration
#
Gravatar
Tue Jul 14 02:22:26 -0700 2009
1
2
3
#
# Somewhere in a daemon where activerecord is being used
#
Gravatar
Fri Jul 10 15:19:59 -0700 2009
1
2
3
#
# Place this in a directory, and clone the ruote repo into the same directory
#
Gravatar
Fri Jul 10 05:13:07 -0700 2009
1
2
3
#
# AMQP generated daemon (this would be the file in libexec/)
#
Gravatar
Mon Jun 22 09:31:00 -0700 2009
1
2
3
#
# The code below is lifted from a daemon generated with daemon-kit.
#
Gravatar
Mon Jun 22 07:52:32 -0700 2009
1
2
3
kenneth@jenny ~/tmp/dk/crond $ ./bin/crond start
kenneth@jenny ~/tmp/dk/crond $ ./bin/crond start
Process already running with id 28197
Gravatar
Fri Jun 12 07:20:34 -0700 2009
1
2
3
A testament [1] to Handsoap [2], while rewriting the postini gem [3]. This is from git log
 
$ git log --stat 2f91d4d6eaa8bd76c188f20929a19e456d1bb52e..HEAD | grep changed
Gravatar
Thu Jun 04 08:40:56 -0700 2009
1
2
3
INSTRUCTIONS FOR USE
====================
 
Gravatar
Tue May 26 05:45:32 -0700 2009
1
2
3
# This task will only be ran once
task :foo do
  unless fetch(:foo_completed, false) do