Public Gists by terrbear

Gravatar
Tue Nov 17 10:34:18 -0800 2009
1
2
3
  ServiceListener::Webhit.instance_eval do
    def make(*args)
      attrs = args.first || {}
Gravatar
Mon Nov 09 13:58:15 -0800 2009
1
2
3
<% tooltip_tag("my_id",
:hideAfter => 1,
:delay => 0.2,
Gravatar
Sat Nov 07 06:57:15 -0800 2009
1
2
3
    def queue(id)
      q = Beanstalk::Pool.new(["localhost:11300"])
      q.connect
Gravatar
Tue Oct 13 13:20:49 -0700 2009
1
2
3
  def self.up
    task = ActivityTemplate.find(:first, :name => "UPDATED_TASK")
    task.activity_template_variables << ActivityTemplateVariable.new(:name => "group", :value_type => "service_org_all_groups", :aggregate => false)
Gravatar
Tue Oct 13 08:42:34 -0700 2009
1
2
3
  loadWidget: function(tab, body, widget_name) {
    var params = KALIVO.global_params;
    params.id = widget_name;
Gravatar
Mon Oct 12 08:56:37 -0700 2009
1
2
3
      module WriteState
        # Writes <tt>state</tt> to the state column and persists it to the database
        # using update_attribute (which bypasses validation)
Gravatar
Thu Sep 24 10:44:29 -0700 2009
1
2
3
  named_scope :nigh, Proc.new{
    {
      :joins => "inner join task_statuses on task_statuses.task_id = convs.id",
Gravatar
Wed Sep 09 11:37:29 -0700 2009
1
2
3
require 'open-uri'
 
class ScoresController < ApplicationController
Gravatar
Wed Sep 02 15:44:17 -0700 2009
1
2
3
-----Original Message-----
From: Maarten Metz
Sent: Mon 8/31/2009 11:36 AM
Gravatar
Wed Sep 02 15:31:47 -0700 2009
1
2
3
To: <staging1@ngenplatform.com>
X-OriginalArrivalTime: 02 Sep 2009 22:05:01.0824 (UTC) FILETIME=[6B39E000:01CA2C19]
 
Gravatar
Wed Sep 02 15:31:46 -0700 2009
1
2
3
To: <staging1@ngenplatform.com>
X-OriginalArrivalTime: 02 Sep 2009 22:05:01.0824 (UTC) FILETIME=[6B39E000:01CA2C19]
 
Gravatar
Fri Aug 28 07:32:47 -0700 2009
1
2
3
class Object
  define_method(:def) do |name, &block|
    Object.send(:define_method, name, &block)
Gravatar
Fri Jul 31 13:47:35 -0700 2009
1
2
3
require 'oauth/models/consumers/token'
class ConsumerToken < ActiveRecord::Base
  include Oauth::Models::Consumers::Token
Gravatar
Thu Jul 16 09:42:01 -0700 2009
1
2
3
  def interpolated_body(user, opts={})
    #[terry] The first thing I looked for was a set of tests for this, because
    #it's really complicated now. There are no new tests. This is disappointing
Gravatar
Thu Jul 16 09:33:59 -0700 2009
1
2
3
  def sidebar_cache(key)
    (@sidebar_cache ||= {
      :author_profile => [(@conv ? @conv.id : nil)],
Gravatar
Wed Jul 08 10:03:03 -0700 2009
1
2
3
in /lib/kalivo/cache/key_gens.rb
 
def ck_widget(user_widget, user = nil)
Gravatar
Thu Jul 02 10:57:49 -0700 2009
1
2
3
config.after_initialize do
  AsyncObserver::Queue.queue = Beanstalk::Pool.new(%w(localhost:11300))
 
Gravatar
Wed Jul 01 15:51:28 -0700 2009
1
2
3
===================================================================
--- lib/widgets/external_widgets.rb (revision 13560)
+++ lib/widgets/external_widgets.rb (working copy)
Gravatar
Fri Jun 19 12:29:46 -0700 2009
1
2
3
CURB!
irb(main):010:0> req = Net::HTTP.new("google.com", 80)
=> #<Net::HTTP google.com:80 open=false>
Gravatar
Fri Jun 19 11:51:29 -0700 2009
1
File.read("svns.txt").split("\n").map{|l| l.split(/\s/)}.each{|pid| `kill -9 #{pid[0]}`}