Forking has been fixed, but the old repositories will still be corrupted.
The method page will create a new page:
page "home" do
"Hello, world!"
| class Canine | |
| VERSION = '1.3' | |
| def initialize(&block) | |
| @commands = Hash.new | |
| @default = @latest = :commands | |
| @empty = nil | |
| @auto = { | |
| :commands => hash_command("commands","Show a list of commands",Proc.new { | |
| @commands.each { |cmd| c = cmd[1] | |
| name = c[:name].to_s |
| #!/usr/bin/ruby | |
| RLSP_VERSION = "1.4.2" | |
| class Lambda | |
| attr_accessor :args, :body | |
| def initialize(args=[],body="") | |
| @args = (args.class == Array) ? args : [args] | |
| @body = body | |
| end |
| #!/usr/bin/ruby | |
| # Viewing as a Gist? See rubytask.md at the bottom | |
| ARGV.push 'help' if ARGV.empty? | |
| command = ARGV.shift.downcase | |
| Taskfile = '/home/'+ENV['USER']+'/.rtasks' | |
| system "touch #{Taskfile}" if !File.exist? Taskfile |
| require 'humane' | |
| server = HB::Server.new # use "include HB" for even more fun | |
| server.path "/" do # Hello world, HB style | |
| write true, "h1. Hello, world!" # write() = puts() for the web; hx. = <hx></hx> | |
| write true, "The URL you entered was '%s'" % url # Just pop that word in there and enjoy | |
| end | |
| server.path "/submit" do |name| # auto-magically gives you POST/GET-ed variables |
| class Enum; class << self; def new(*list) | |
| i = (list[0].class == Fixnum) ? list.shift : 0 | |
| Class.new.class_eval do | |
| list.each { |item| const_set item, i; i += 1 } | |
| class << self; | |
| def each(&blk); self.constants.each { |i| blk.call(i) }; nil; end | |
| def map(&blk); self.constants.map { |i| blk.call(i) }; end | |
| end | |
| self | |
| end |
| <html> | |
| <head> | |
| <title>Javascript REPL</title> | |
| <script type="text/javascript"> | |
| function $(i){return document.getElementById(i);} | |
| </script> | |
| </head> | |
| <body> | |
| <pre><span id="repl"></span><span style="font-size:12px;">█</span></pre> | |
| <script type="text/javascript"> |
| #!/usr/bin/ruby | |
| =begin | |
| Changelog for 1.7 | |
| * Fixed a bug where bottom-level directories did not, in fact, have their '/' | |
| * Allowed the specification of flags and directories in any order. Thus, the | |
| results of `tree -depth 1 test` and `tree test -depth 1` are identical, and | |
| either can be used. | |
| Changelog for 1.6.2 |