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 Publisher | |
def self.included(base) | |
base.instance_eval do | |
@class_registrations ||= Set.new | |
include Wisper.model | |
# ensures we override Wisper's definitions | |
include InstanceMethods | |
extend ClassMethods | |
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
$ passenger start -p4000 | |
Nginx core 1.2.6 isn't installed | |
Phusion Passenger Standalone will automatically install it into: | |
/home/racine2013/.passenger/standalone/3.0.19-x86_64-ruby1.9.2-linux-gcc4.4.3-1002/nginx-1.2.6 | |
This will only be done once. Please sit back and relax while installation is | |
in progress. |
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
<?php | |
/** | |
* Plugin Name: Twitter Widget Pro | |
* Plugin URI: http://xavisys.com/wordpress-plugins/wordpress-twitter-widget/ | |
* Description: A widget that properly handles twitter feeds, including @username, #hashtag, and link parsing. It can even display profile images for the users. Requires PHP5. | |
* Version: 2.2.0 | |
* Author: Aaron D. Campbell | |
* Author URI: http://xavisys.com/ | |
* Text Domain: twitter-widget-pro | |
*/ |
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
class Remote < Application | |
def download | |
ok = true | |
[<a bunch of model names...>].each do |model| | |
# Get the remote records for the model | |
records = [] | |
repository(:remote) {records = model.all} | |
# Copy the records to the default repository |
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 -Ku | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'mysql://localhost/testdb') | |
class User | |
include DataMapper::Resource |
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 -Ku | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'mysql://localhost/testdb') | |
class Host |
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 -Ku | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'mysql://localhost/testdb') | |
class User | |
include DataMapper::Resource |
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 -Ku | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'mysql://localhost/testdb') | |
class User | |
include DataMapper::Resource |
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 -Ku | |
require 'rubygems' | |
require 'dm-core' | |
DataMapper::Logger.new($stdout, :debug) | |
DataMapper.setup(:default, 'mysql://localhost/testdb') | |
class Event | |
include DataMapper::Resource |