Quitting problem sites with uBlock (or adblock if you prefer)

I figured out how to use uBlock to better block myself out of problem sites. I’ve had a bit of a problem with tumblr due to both high volume and noise. So diving into the world of Adblock filter syntax, I came up with the following. uBlock doesn’t actually do a blanket site-wide rule. I had considered

http://pastebin.com/embed_iframe.php?i=sEDVvYYW

The only necessary line is tumblr.com##body. This hides the content of the page (everything in the body html tag). The rest of the rules are there to help block files that are loaded by the header, scripts, and css. There are a handful of objects that get pulled in by an inline script.

Individual users can be whitelisted as username.tumblr.com as needed.

You can do the same thing with tumblr.com * * block in advanced mode, but you still need to block the body tag because uBlock will still render first page.

Similarly, when was the last time that youtube comments were actually useful: http://www.youtube.com###watch-discussion

Advertisements

One-swap sorting problem in common lisp.

One-swap sorting problem in common lisp.

Given an array of unique integers, determine if it is possible to sort the array by swapping two elements of the array. For instance, the array [1,2,6,4,5,3,7] can be sorted by swapping 3 and 6, but there is no way to sort the array [5,4,3,2,1] by swapping two of its elements. You may use O(n) time, where the array has n integers, and constant additional space.

http://pastebin.com/embed_js.php?i=BqRV2KzJ