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
<html> | |
<head> | |
<%= javascript_include_tag 'application' %> | |
</head> | |
<body> | |
Use sweet js functions here | |
</body> | |
</html> |
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
{ | |
"title": "Creating great content", | |
"content": "Ive got nothing", | |
"comments": [ | |
] | |
"version": 2 | |
"versions": [ | |
{ "title": "Creating great content", "version": 1 } | |
] | |
} |
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
j = Job.allocate | |
j.init_with('attributes' => {'name' => 'Awesome Shop', 'title' => 'Test Job', 'status' => 'complete'}) | |
j.title # => 'Test Job' |
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
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
config.action_mailer.perform_deliveries = false | |
config.action_mailer.default :charset => "utf-8" | |
config.active_support.deprecation = :log | |
config.mongo_fifo = MongoFifo::Store.new(Mongo::Connection.new['mongo_fifo']) |
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
./configure --interfaces=ruby_modular --libs=/Users/rimas/.rvm/rubies/ruby-1.9.2-p290/lib --rubydir=/Users/rimas/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/x86_64-darwin10.8.0 |
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
require 'libsvm' | |
# This library is namespaced. | |
problem = Libsvm::Problem.new | |
parameter = Libsvm::SvmParameter.new | |
parameter.cache_size = 1 # in megabytes | |
parameter.eps = 0.001 | |
parameter.c = 10 |
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 Awesomeapp::Resque < Resque::Server | |
# Will redirect back to rails app to require a sign in | |
before do | |
env['warden'].authenticate! | |
end | |
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
class Post | |
include Mongoid::Document | |
field :author | |
field :text | |
field :publish_date, :type => Date | |
embeds_many :comments | |
index [:author, :asc] | |
end | |
class Comment |
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
require 'dm-core' | |
require 'dm-mysql' | |
# Shows available options | |
class HasAllOption | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String |
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
`echo "#{Process.pid}" > #{Merb.root}/log/metrics_gen.pid` | |
`echo "#{Process.ppid}" > #{Merb.root}/log/metrics_gen.ppid` |