Skip to content

Instantly share code, notes, and snippets.

require 'open-uri'
require 'json'
p = JSON.parse(URI.parse('http://files.olo.com/pizzas.json').read).map { |p| p['toppings'].sort.join(', ') }.flatten
puts p.uniq.map { |c| [c, p.count(c)]}.sort { |a,b| b[1] <=> a[1] }[0...20].map.with_index { |t,i| "#{i+1}. #{t[0]}: #{t[1]}" }.join("\n")
@tamalw
tamalw / index.html
Created April 28, 2020 04:56
Logo Test
<div id="blurb">
<p><svg id="logo" width="200" height="173.2">
<polygon points="50,0
150,0
50,173.2
0,86.6
200,86.6
150,173.2" />
</svg></p>