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
===== HTML mode ===== | |
<!DOCTYPE HTML PUBLIC | |
"-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<body> | |
<p> | |
Hello, | |
</p> | |
<br> |
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
$ ./hello.rb | |
===== HTML mode ===== | |
<!DOCTYPE HTML PUBLIC | |
"-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<body> | |
<p> | |
Hello, | |
</p> |
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
foo |
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
module Rxhp | |
module Html | |
module Attributes | |
GLOBAL = { | |
:accesskey => String, | |
:class => String, | |
:contenteditable => %w'true false inherit', | |
:contextmenu => String, | |
:dir => %w'ltr rtl auto', | |
:draggable => %w'true false', |
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
#!/usr/bin/env ruby | |
$LOAD_PATH.push './lib' | |
n = 1000 | |
begin | |
require 'continuation' | |
rescue LoadError | |
# Ignore, Ruby 1.8 | |
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
$ rvm use 1.8.7@rxhp | |
Using /Users/fred/.rvm/gems/ruby-1.8.7-p352 with gemset rxhp | |
$ ./bm.rb | |
1000 loads: 0.09695s | |
1000 creations: 0.047529s | |
1000 renders: 0.529924s | |
1000 ugly renders: 0.498918s | |
1000 tiny renders: 0.481867s | |
$ rvm use 1.9.3@rxhp | |
Using /Users/fred/.rvm/gems/ruby-1.9.3-preview1 with gemset rxhp |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' # 'gem install --user-install json' if this fails | |
require 'cgi' | |
require 'net/http' | |
require 'net/https' | |
require 'optparse' | |
require 'uri' | |
group_id = 201636233240648 |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' # 'gem install --user-install json' if this fails | |
require 'cgi' | |
require 'net/http' | |
require 'net/https' | |
require 'optparse' | |
require 'uri' | |
group_id = 201636233240648 |
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
#!/usr/bin/env ruby | |
# Copyright (c) 2012, Fred Emmott <mail@fredemmott.co.uk> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# === requires === | |
require 'find' | |
require 'set' | |
require 'shellwords' | |
require 'taglib2' # ruby-taglib2 gem | |
require 'tempfile' |
OlderNewer