buddydvd
Joined 17 years ago
Joined 17 years ago
# 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)http://imgur.com/upload?url=https%3A%2F%2Fnews.ycombinator.c...
Perhaps someone had included a URL like the one above in some wordpress template.
See: http://nullsleep.tumblr.com/post/16524517190/animated-gif-mi...
Edit: This is what it looks like with all frame delays set to 2 centiseconds: http://i.imgur.com/24xpZEd.gif
On Chrome and Firefox, you should see it animate more quickly.
See: https://developer.apple.com/library/ios/#releasenotes/StoreK...
One way to resolve that issue is to create two versions of the password (one with normal casing and one with inverted casing, but both with the first character lowercased), sort them, and pick the first result.
["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.Despite the bug, I think it illustrates a good point. You can adopt a specific coding style that help you achieve higher level of minification/obfuscation.
It would be nice if languages like TypeScript can perform this transformation for you.
But not that's not what caused the problem mentioned in this post.
(edited for clairifcation)