Skip to content

Instantly share code, notes, and snippets.

View nmerouze's full-sized avatar

Nicolas Mérouze nmerouze

View GitHub Profile
$.getJSON("http://search.twitter.com/search.json?&q=from:nmerouze&callback=?", function(data) {
});
./to_pdf -n 27 http://nmerouze.github.com/blockcampparis09
<!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>
// 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
$(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 };
});
});
});
Post.blueprint do
title "I like MongoDB!"
body "I have a ton of reasons for that."
end
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function displayTweets(data) {
$("#loading").remove();
$.each(data.results, function(i, item) {
$("#tweets").append($("<li/>").text(item.text));
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta charset="utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script>
$(function() {
var canvas = document.createElement("canvas");
var img = new Image();
require 'vendor/gems/environment'
require 'cramp/controller'
require 'uuid'
require 'mq'
Cramp::Controller::Websocket.backend = :thin
class TweetsController < Cramp::Controller::Websocket
end
git push heroku master