Show HN: I created a Chrome extension that reveals HN's hidden comment scores.
chrome.google.com5 ポイント投稿者 buddydvd5 コメント
# show only items in both a and b
comm -1 -2 <(sort -u a_list) <(sort -u b_list)
# show only items unique to a
comm -2 -3 <(sort -u a_list) <(sort -u b_list)
# show only items unique to b
comm -1 -3 <(sort -u a_list) <(sort -u b_list) ["pAsSwOrD", "PaSsWoRd", "PAsSwOrD"].map(function canonicalize(pwd) {
function invert(str) {
return (str == str.toUpperCase()
? str.toLowerCase()
: str.toUpperCase());
}
var head = pwd.substring(0, 1).toLowerCase();
var tail = pwd.substring(1);
var vers = [head + tail,
head + tail.split("").map(invert).join("")];
return vers.sort()[0];
});
Which gives the following result: ["pAsSwOrD", "pAsSwOrD", "pAsSwOrD"]
The three different variations get canonicalized into one version. With it, you can just store one hash instead of three. 14.9.1 What is Cacheable
By default, a response is cacheable if the requirements of the
request method, request header fields, and the response status
indicate that it is cacheable.
Section 9.5 (for the POST request method): Responses to this method are not cacheable, unless the response
includes appropriate Cache-Control or Expires header fields. However,
the 303 (See Other) response can be used to direct the user agent to
retrieve a cacheable resource.
Responses to the POST request method are not cacheable by default according to the spec.
should really be
instead.
But not that's not what caused the problem mentioned in this post.
(edited for clairifcation)