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
Post.blueprint do | |
title "I like MongoDB!" | |
body "I have a ton of reasons for that." | |
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
$(function() { | |
$.getJSON("http://search.twitter.com/search.json?&q=appcelerator&rpp=10&callback=?", function(json) { | |
var data = _.map(json.results, function(item) { | |
return { text:item.text, image:item.profile_image_url }; | |
}); | |
}); | |
}); |
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
// With hassox' patch | |
require('./mustache'); // Like I do with Underscore.js | |
Mustache.to_html("{{title}}", { title: "Title" }); // It doesn't work | |
// With exports.to_html = Mustache.to_html; in mustache.js | |
var Mustache = require('./mustache'); | |
Mustache.to_html("{{title}}", { title: "Title" }); // It works |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>My Framework</title> | |
</head> | |
<body> |
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
./to_pdf -n 27 http://nmerouze.github.com/blockcampparis09 |
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
$.getJSON("http://search.twitter.com/search.json?&q=from:nmerouze&callback=?", function(data) { | |
}); |
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 User | |
include MongoMapper::Document | |
devise :authenticatable, :rememberable | |
key :email, String | |
key :encrypted_password, String | |
key :password_salt, String | |
key :remember_token, String | |
key :remember_created_at, DateTime | |
timestamps! |
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
Ruby 1.8.6 w/o C extension | |
========================== | |
user system total real | |
single object inserts: 3.450000 0.160000 3.610000 ( 3.779446) | |
multiple object insert: 2.190000 0.020000 2.210000 ( 2.223418) | |
find_one: 0.070000 0.000000 0.070000 ( 0.087103) | |
Ruby 1.8.6 w/ C extension | |
========================= | |
user system total real |
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
# MongoDB Java driver vs Ruby Driver with JRuby 1.3.1 | |
# | |
# user system total real | |
# java driver (find) 2.266000 0.000000 2.266000 ( 2.266000) | |
# ruby driver (find) 6.790000 0.000000 6.790000 ( 6.790000) | |
# java driver (create) 0.602000 0.000000 0.602000 ( 0.602000) | |
# ruby driver (create) 3.963000 0.000000 3.963000 ( 3.963000) | |
require "java" | |
require "benchmark" |
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
# http://github.com/giraffesoft/resource_controller/tree/master | |
### Exemple | |
class MoviesController < ResourceController::Base | |
end |