This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pure CSS magic line system | |
* Inspiration: http://css-tricks.com/jquery-magicline-navigation/ | |
* This is a WIP. | |
*/ | |
a:link, a:visited { | |
color:black; | |
text-decoration:none; | |
} | |
a:hover ~ .magicline { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Actually, if UNIQUE is defined on the col, there is no need to store previous codes | |
-- It will fail to insert due to uniqueness contraint when all possible codes are exhausted | |
-- Use as a column default... | |
-- CREATE TABLE foo (id CHAR(6) DEFAULT AlphaNumericSerial() UNIQUE); | |
CREATE OR REPLACE FUNCTION AlphaNumericSerial() | |
RETURNS char(6) AS $$ | |
DECLARE _serial char(6); _i int; _chars char(36) = 'abcdefghijklmnopqrstuvwxyz0123456789'; | |
BEGIN | |
_serial = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ever needed to escape '\n' as '\\n'? This function does that for any character, | |
// using hex and/or Unicode escape sequences (whichever are shortest). | |
// Demo: http://mothereff.in/js-escapes | |
function unicodeEscape(str) { | |
return str.replace(/[\s\S]/g, function(character) { | |
var escape = character.charCodeAt().toString(16), | |
longhand = escape.length > 2; | |
return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recursive wget with link rewriting to point to local/relative paths | |
wget -rk <url> |
NewerOlder