02 Nov '13, 12pm

You wanna have a minimal server for your tests? Just use this (needs Ruby) and it's good to go! This is perfect!!

) have written about a single line web browser in Python. I wondered what it would look like in Ruby. Here’s one answer… ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>".").start' Since WEBrick defaults to port 80 and doesn’t use the current directory as the document root by default, we have to add that information to the command line. Although interesting, I find the following script more useful than a single line command. I often generate HTML docs on a machine at work that doesn’t have a web server, nor file system that is available to my browser’s "file:" protocol. So I fire up the "servefiles.rb" script below. #!/usr/local/bin/ruby require 'webrick' include WEBrick dir = Dir::pwd port = 12000 + (dir.hash % 1000) puts "URL: http://#{Socket.gethostname}:#{port}" s = HTTPServer.new( :Port => port, :DocumentRoot => dir ) trap("INT"){ s.shutdown } s....

Full article: http://onestepback.org/index.cgi/Tech/Ruby/WEBrick.rdoc

Tweets

Be a Good Designer, Be a Good Client

robots.thoughtbot.com 30 Oct '13, 7pm

Be a Good Designer, Be a Good Client Magnus Gyllenswärd October 29, 2013 design There has been a lot of talk about empathy...

The Bitcoin travellers: round the world using o...

theguardian.com 01 Nov '13, 3pm

Negotiating foreign currencies can be a headache for any traveller. Persuading someone to accept payment in a currency the...

Make your tests more resilient through internat...

robots.thoughtbot.com 26 Oct '13, 2pm

Better Tests Through Internationalization Derek Prior October 26, 2013 rails TDD Internationalization (i18n) is the proces...

Dear Rory, Welcome back...if you're back

Dear Rory, Welcome back...if you're back

golf.com 01 Nov '13, 5pm

Welcome back. I mean -- if you are back. I certainly hope you're back. It's been a long, lonely 2013 for your fans, but th...

Perfect PCBs With an Inkjet Printer

Perfect PCBs With an Inkjet Printer

hackaday.com 02 Nov '13, 11am

Blowing toner around your workplace is really not good for your health, not to mention it gets everywhere and sticks. If y...

Bernhard Langer needs to win Schwab Championshi...

pga.com 30 Oct '13, 10pm

SAN FRANCISCO – Bernhard Langer knows what he needs to do at TPC Harding Park to win the Charles Schwab Cup season points ...

Another gem from @MagnusGyllensw today: This on...

robots.thoughtbot.com 30 Oct '13, 7pm

Be a Good Designer, Be a Good Client Magnus Gyllenswärd October 29, 2013 design There has been a lot of talk about empathy...

Human Brain Project Needs Artificial Brains to ...

spectrum.ieee.org 31 Oct '13, 5pm

If neuroscientist Henry Markram had a dollar for every neuron he wants to map, he still wouldn't have enough money. As it ...

dbbrowser gem - Simple Mountable Database Brows...

rubyflow.com 01 Nov '13, 8pm

dbbrowser gem - Simple Mountable Database Browser (using ActiveRecord) - mount DbBrowser::Server Posted by geraldbauer on ...

[Prod/Sustainablity] Is That Drywall "Just"? Ne...

buildinggreen.com 04 Nov '13, 2am

Building product manufacturers and other organizations can now declare their performance on metrics like worker safety, di...

How One Electric Utility Encouraged Employees To Use Plug-In Cars

How One Electric Utility Encouraged Employees T...

greencarreports.com 31 Oct '13, 4pm

By John Voelcker 651 views Oct 31, 2013 Follow John Add to circle Reddit This! Share on Facebook Share on Twitter Plug-in ...

Top Ruby Article: November 2013 Meeting:

lrug.org 30 Oct '13, 12pm

The November 2013 meeting of LRUG will be on Monday the 11th of November , from 6:30pm to 8:00pm. Our hosts Skills Matter ...

Want a spooky Halloween story? Formaldehyde-based foam insulation is back from the dead!

Want a spooky Halloween story? Formaldehyde-bas...

buildinggreen.com 31 Oct '13, 7pm

Urea formaldehyde foam insulation (UFFI) has been out of the spotlight, but going into a lot of buildings—often being refe...

Good news for the green economy

businessgreen.com 31 Oct '13, 1pm

It is time, I think we can all agree, for some good news. So thanks to the Netherlands Environmental Assessment Agency and...

Using Analytics To Enhance Your Link Building Strategy

Using Analytics To Enhance Your Link Building S...

searchengineland.com 29 Oct '13, 1pm

Like everyone else, I’m not psyched that Google took away my organic keyword data. It’s pretty uncool and, as a marketer, ...