advanced-code.org
Turns out there’s more way to do code than just BEGIN_EXAMPLE.
This should work:
fixed width? how does this work? ........... ............ . . . . . . .. ....... ..... . . ....
Two ASCII blobs.
And this:
# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
str.scan(@org_emphasis_regexp) do |match|
yield $2, $3
end
end
Now let’s test case-insensitive code blocks.
# Finds all emphasis matches in a string.
# Supply a block that will get the marker and body as parameters.
def match_all(str)
str.scan(@org_emphasis_regexp) do |match|
yield $2, $3
end
end
(def fib-seq
(concat
[0 1]
((fn rfib [a b]
(lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
user> (take 20 fib-seq)
(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
Even if no language is set, it is still wrapped in code tags but class is empty.
echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
I really love to write about :symbols. They sure are the best things in the world!
{
:one => 1,
:two => 2
}
(defproject helloworld "0.1"
:dependencies [[org.clojure/clojure
"1.1.0-master-SNAPSHOT"]
[org.clojure/clojure-contrib
"1.0-SNAPSHOT"]]
:main helloworld)
<script>alert('hello world')</script>
* {
/* apply a natural box layout model to all elements */
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
<html>
<head>
<title>Hello</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
class Post << ActiveRecord::Base
def print_title
puts "#{self.title}"
end
end
import mapnik
m = mapnik.Map(600, 800)
m.background = Map.Color('steelblue')
exports = this;
(function($){
var Posts = {};
Posts.index = function(){
// TODO
};
})(jQuery);
{ name: "Waldemar"
, surname: "Quevedo"
}
echo "Hello";
phpinfo();
var_dump(some_var);
(defun hello()
(interactive)
(message "hello"))
!+!+++!++!++!++!+