Skip to content

Instantly share code, notes, and snippets.

response = begin
uri = URI.parse(uri)
Timeout::timeout(@timeout) {
http = Net::HTTP.new(uri.host, uri.port)
if uri.scheme == 'https'
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
#!/bin/sh
case "$1" in
start)
tc qdisc add dev lo root handle 1: htb default 1
tc class add dev lo parent 1: classid 1:1 htb rate 80kbps #ceil 80kbps
tc filter add dev lo protocol ip parent 1: prio 1 u32 match ip dport 80 0xffff flowid 1:1
;;
status)