This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# :title:Category Filter Tests | |
# = Name | |
# Test the categories (left-nav checkboxes) filter | |
# = Description | |
# Show that the filter is working as intended. | |
require "selenium_helper" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ZepFrog | |
module DasPermalinkor | |
def self.included(base) | |
base.extend Permalinkor | |
end | |
module Permalinkor | |
def das_permalinked(options = {}) | |
options[:name] ||= :permalink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# init.rb | |
ActiveRecord::Base.send(:include, ZepFrog::DasPermalinkor) | |
# /lib/zepfrog/das_permalinkor.rb | |
module ZepFrog | |
module DasPermalinkor | |
def self.included(base) | |
base.extend Permalinkor | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cron jobs start here -------------------------------------------------------------- | |
def self.check_trial | |
accounts = BillingAccount.find(:all, :include => :user, :conditions => ["kind = 'trial' and status = 'active'"]) | |
accounts.each do |a| | |
if a.expires_at.to_s == Time.today.strftime("%Y-%m-%d") | |
pay_me = execute_payment(:customer_profile_id => a.customer_profile_id, :customer_payment_profile_id => a.customer_payment_profile_id, :user_id => a.user_id) | |
if pay_me.success? | |
a.kind = "full" | |
a.expires_at = 1.year.from_now | |
a.save! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in mibbit.com/Firefox) | |
You are now sending with translation to English | |
You are now receiving with translation to Russian | |
23:27 bitpimpin hello. (hello.) | |
You are now sending with translation to Russian | |
23:28 bitpimpin This is a test. (Это тест.) | |
23:28 bitpimpin Hello. (Здравствуйте.) | |
You are now receiving with translation to English | |
23:28 bitpimpin Test (Проверка) | |
23:28 bitpimpin Okay, if this actually works, this is OMG universal translator (Хорошо, если это действительно работает, это OMG универсальный переводчик) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Electrons flush into infinity & a hot robot hibernates: to dream of electric foos, to become digital meme in analog shell. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def serialize_to_json(options={}) | |
namespace = options[:namespace].nil? ? 'ZEP' : options[:namespace] | |
if options[:data] | |
list = options[:data] | |
js = "" | |
js << "<script type=\"text/javascript\">" | |
js << "\n\tif (typeof #{namespace} !== 'object') { var #{namespace} = {}; }\n" | |
js << "\n\tif (typeof #{namespace}.models !== 'object') { #{namespace}.models = {}; }\n" | |
list.each do |obj| | |
if obj.respond_to? :to_json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :rdoc do | |
desc "Generate RDocs for ZepInvest (exluding RESTful Authentication Plugin)" | |
task :generate do | |
`rdoc --exclude restful_authentication -o zepdocs ; open zepdocs/index.html` | |
end | |
desc "Remove old docs and regenerate RDocs for ZepInvest (exluding RESTful Authentication Plugin)" | |
task :regenerate do | |
`rm -rf zepdocs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for multiline ruby statements in haml... | |
= { :foo => :bar, | | |
:baz => :foo, | | |
:quux => :zz}.inspect | | |
# the magical 'pipe' strikes again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/ruby | |
# Attributed to user 413x from rubystuff.org | |
require "socket" | |
# Don't allow use of "tainted" data by potentially dangerous operations | |
$SAFE=1 | |
# The irc class, which talks to the server and holds the main event loop |
OlderNewer