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
<?xml version="1.0"?> | |
<output> | |
<blogpost> | |
<url>http://cre8ivethought.com/blog/2010/08/22/importing-comments-into-disqus/</url> | |
<title>Title of the post</title> | |
<guid>{the guid that Disqus has for the post, often it is just the url}</guid> | |
<comments> | |
<comment> | |
<isAnon>1</isAnon> | |
<score>1</score> |
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
<script type="text/javascript"> | |
$(document).ready(function() { | |
var app = $.sammy(function() { | |
this.get('#/', function() { | |
clear_book_information_panel_when_needed(); | |
}); | |
this.get('#/:book_name/Details', function() { |
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
<script type="text/javascript"> | |
function submit_form() { | |
$('#form_abc').submit(); | |
} | |
</script> | |
<!-- Some other HTML or something else //--> | |
<script type="text/javascript"> | |
function submit_form() { |
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
task :spec do | |
require "rspec/core/rake_task" | |
RSpec::Core::RakeTask.new(:client) do |t| | |
t.pattern = "spec/**/*_spec.rb" | |
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
- for article in @blog_dorsey.articles.select{|item| item[:published] }[0...5] | |
= haml :'_article_heading', :layout => false, :article => article <<< passing article to the second partial view? |
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
$blog_dorsey = Dorsey::Server.new do | |
set :article_path, './blog/articles' | |
set :article_prefix, "blog" | |
set :host, "http://cre8ivethought.com/" | |
set :disqus, "some_disqus_id" | |
set :date, lambda {|now| now.strftime("%B #{now.day.ordinal} %Y") } | |
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
require 'compass' | |
require 'compass/app_integration/rails' | |
Compass::AppIntegration::Rails.initialize! | |
Compass.configuration do |config| | |
config.project_path = File.dirname(__FILE__) | |
config.sass_dir = "app/stylesheets" | |
config.project_type = :rails | |
config.http_path = "/" |
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
I have a weird issue with rails3 | |
I have two models User and AuthenticationProvider, I also have a helper UserManager in the namespace Authentication::UserHelper. The UserManager uses both models | |
/app/ | |
/models/ | |
/User | |
/AuthenticationProvider | |
/helpers/ | |
/authentication/ |
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
include MongoMapper | |
host = ENV['MONGODB_HOST'] | |
port = ENV['MONGODB_PORT'] | |
database = ENV['MONGODB_DATABASE'] | |
username = ENV['MONGODB_USER_NAME'] | |
password = ENV['MONGODB_PASSWORD'] | |
MongoMapper.connection = Mongo::Connection.new(host || 'localhost', | |
port || 27017, |
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
var server = ClientExpress.createServer(); | |
server.configure(function() { | |
server.use(server.content_target_area("content")); | |
server.set('views', '/example/views/'); | |
server.set('view engine', 'html'); | |
server.register('.html', template_engine); | |
}); | |
server.configure('development', function() { |