Convert RDoc markup to HTML
If you want to convert a README.rdoc
file to HTML, say this from a shell:
rdoc README.rdoc
You will find the generated HTML in doc/index.html
.
If you do this while working on
one of our gems
Show archive.org snapshot
, please .gitignore
everything in doc
and don't commit the generated HTML.
Related cards:
Customize tokenization of the MySQL FULLTEXT parser
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it splits a word at period characters.
Since the tokenizer has near-zero configuration options (minimum word length and stopwords list), you n...
htmlBurger PSD to HTML ยป Home - Convert your Design into Standards compliant XHTML/CSS
We simply convert your design (PSD, PNG, AI, etc.) into a hand coded, pixel perfect and Standards compliant XHTML/CSS. Since our service is targeted to agencies and freelancers the job done by us is 100% confidential. In addition we are offering p...
Semantic markup standard for search engines
If you would like to enrich your website with semantic markup like contact data, places or events you should have a look at schema.org. "Search engines including Bing, Google and Yahoo! rely on this markup to improve the disp...
Cucumber step to test that a tooltip text exists in the HTML
Tooltips that are delivered through HTML attributes are encoded. Decode entities before checking for their presence.
Capybara:
Then /^there should( not)? be a(n encoded)? tooltip "([^"]*)"$/ do |negate, encoded, tooltip|
tooltip = HTML...
Online tool to convert tables between different formats
https://tableconvert.com/ is an online tool to convert tables between different formats (e.g. json, markdown, csv).
It also has a button to transpose a table ("rotate" it by 90 degree).
The tool ...
How to make Rational#to_s return strings without denominator 1 again
The way Rational#to_s
works on Ruby has changed from Ruby 1.9 on. Here is how to get the old behavior back.
You may want this for things where Rationals are being used, like when subtracting Date
objects from one another.
What's happening?...
Always convert and strip user-provided images to sRGB
Debugging image color profiles is hard. You can't trust your eyes in this matter, as the image rendering depends on multiple factors. At least the operation system, browser or image viewer software and monitor influence the resulting image colors ...
Converting SVG to other vector formats without Inkscape
If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is to use Inkscape from the commandline.
Inkscape is a fairly resource-heavy tool with [lots of dependencies](https://packages.ubuntu.com/jammy/inkscape...
How to prevent Nokogiri from fixing invalid HTML
Nokogiri is great. It will even fix invalid HTML for you, like a browser would (e.g. move block elements out of parents which are specified to not allow them).
>> Nokogiri::HTML.fragment("<h1><p>foo</p><span>bar</span></h1>").to_s
=> "<h1...
Invoices: How to properly round and calculate totals
While it might seem trivial to implement an invoice that sums up items and shows net, gross and vat totals, it actually involves a lot of rules and caveats. It is very easy to create invoices where numbers don't add up and a few cents are missing....