Skip to content

Instantly share code, notes, and snippets.

@Mr0grog
Mr0grog / example_urls.txt
Last active July 22, 2024 13:18
Check the HTTP status codes for a list of URLs in a file. Undoubtedly there are fancier ways to do this with wget or some other common Linux utilities, but I’m not good enough at bash scripting to find a way to do that with minimal memory usage (if the list of URLs is millions long) and with nice formatting, so I just wrote a script.
www.energy.gov
gobbledegook
apple.com
www.gpo.gov
httpstat.us/404
@smerchek
smerchek / sum.js
Created January 15, 2014 22:55
Sum the items in an Amazon wish list (inspired by "Total up the cost of all items in an Amazon wishlist" https://gist.github.com/chrismbarr/3230548)
var list = $$("span.a-color-price.a-size-base");
var total=0;
for(i=0; i<list.length;i++){
total += parseFloat(list[i].innerText.replace("$",""));
}
alert(list.length+" items for a total of: $"+total.toFixed(2));