Re: Camping's URL mapping system

2012-04-18 Thread Matthias Wächter

Am 13.04.2012 17:40, schrieb Jenna Fox:

An A4 piece of paper has a little over 9kb of data storage if storing in
binary at 300dpi


A4 is about 21*30 cm², i.e. 630 cm² or 97.65 sqin. 300 dpi means 90,000 
dpsqin or about 8.788 MdpA4. Without accounting for encoding, 
redundancy, synchronization etc, this is about 1.1 MByte/A4 paper. If 
you count both sides → 2.2 MBytes raw data. :)


– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Passenger, Rack and __END__ error

2011-10-14 Thread Matthias Wächter

On 13.10.2011 22:54, Magnus Holm wrote:

2011/10/13 Matthias Wächtermatth...@waechter.wiz.at:

On 13.10.2011 20:02, Magnus Holm wrote:


I don't think rackup-files can have __END__.


https://github.com/rack/rack/blob/master/test/builder/end.ru

– Matthias


It's broken: https://github.com/rack/rack/pull/253 (it only handles
one line of content)


right.

This will probably never work, though: [http://pastie.org/2693243]

– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Passenger, Rack and __END__ error

2011-10-14 Thread Matthias Wächter

On 14.10.2011 09:20, Magnus Holm wrote:

right.

This will probably never work, though: [http://pastie.org/2693243]

– Matthias


Woah, I never realized that __END__ was valid on its own line inside a
heredoc/string…


and it’s valid within a multiline comment, too:

=begin
…
__END__
…
=end

and this, again, is valid within a heredoc. Try:

a = FIN
bla
=begin
ble
__END__
bli
=end
blo
FIN

All this regex .gsub! stuff breaks badly considering strings/files that require 
parsing instead.

– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Passenger, Rack and __END__ error

2011-10-14 Thread Matthias Wächter

On 14.10.2011 08:55, Matthias Wächter wrote:

This will probably never work, though: [http://pastie.org/2693243]


I filed that as a Rack bug. Maybe it gets fixed someday.

https://github.com/rack/rack/issues/254

– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: Passenger, Rack and __END__ error

2011-10-13 Thread Matthias Wächter

On 13.10.2011 20:02, Magnus Holm wrote:

I don't think rackup-files can have __END__.


https://github.com/rack/rack/blob/master/test/builder/end.ru

– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: controller for all javascript files?

2011-02-10 Thread Matthias Wächter

On 10.02.2011 02:23, Jenna Fox wrote:

class LoadScript  R '/(.*).js'
def get(script)
@headers['Content-Type'] = 'text/javascript; charset=utf-8'
return File.read(my scripts/#{script}.js);
end
end


remember [http://en.wikipedia.org/wiki/Directory_traversal] – even if you accor 
access to just .js files it’s not good practice to use ‘script’ unchecked.

– Matthias
___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Re: controller for all javascript files?

2011-02-10 Thread Matthias Wächter

On 10.02.2011 09:34, Matthias Wächter wrote:

[…] even if you accor access to just .js files […]


Don’t know how I typed this … :)

Meant: even if you limit access to just .js files

– Matthias

___
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list