Client-Side Server-Side-Includes
$(document).bcome({
done: function() { alert('Done...'); }
});
Supports only <!--# include file=...
for now.
module RedCloth::Formatters::Markdown | |
include RedCloth::Formatters::Base | |
# escapement for regular HTML (not in PRE tag) | |
def escape(text) | |
html_esc(text) | |
end | |
# escapement for HTML in a PRE tag | |
def escape_pre(text) |
require 'rubygems' | |
require 'active_support/memoizable' | |
require 'httparty' | |
module GitHub | |
class User | |
extend ActiveSupport::Memoizable | |
attr_reader :name | |
class Polymorphism | |
attr_reader :base, :ctrl, :path | |
@@polymorph = '' | |
@@polymorphs = '' | |
cattr_reader :polymorph, :polymorphs | |
def self.set_polymorph(polymorph) | |
@@polymorph = "#{ polymorph }" | |
@@polymorphs = "#{ polymorph }".pluralize |
require 'rubygems' | |
require 'not_naughty' | |
# Load the validations you want to use. | |
NotNaughty::Validation.load 'length', 'presence' | |
Person = Struct.new(:name) do | |
extend NotNaughty | |
validates(:name) { presence and length :minimum => 4 } | |
end |
class PagesController < Protected::Base | |
before_filter :authorized?, :except => [:index, :show] | |
before_filter :assign_searcher, :except => :index | |
before_filter :assign_navigation, :except => [:show, :new, :edit] | |
def index | |
@pages = Page.find :all | |
end |
require 'rubygems' | |
require 'mq' | |
#require 'yajl' | |
#require 'sequel' | |
require 'em-websocket' | |
require 'uuid' | |
AMQP.start(:host => 'localhost') do | |
uuid = UUID.new # drop UUID in favour of 1 | |
chat = MQ.new.fanout 'chat' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Page Title</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" charset="utf-8"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function() { | |
$('.card').draggable() |
make -C compatlib install | |
/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -I/Users/boof/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -Kthread -kthread -pthread -pthreads -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS -I../include -I../../../../src/interfaces/ecpg/include -I../../../../src/interfaces/libpq -I../../../../src/include/utils -I../../../../src/include -I/Users/boof/local/Cellar/readline/6.1/include -isystem /Users/boof/local/include -I/usr/include/libxml2 -DSO_MAJOR_VERSION=3 -c -o informix.o informix.c | |
awk '/^[^#]/ {printf "_%s\n",$1}' exports.txt >exports.list | |
/bin/sh ../../../../config/install-sh -c -d '/Users/boof/local/Cellar/postgresql/9.0.1/lib' | |
/usr/bin/cc -O3 -march=core2 -msse4.1 -w -pipe -I/usr/include/libxml2 -I/Users/boof/local/Cellar/ossp-uuid/1.6.2/include -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-label |
http://jsfiddle.net/yBLNX/1/ |