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
/* | |
Get a list of all ALTER commands needed to change collation on all tables in the given database | |
Note: Remember to set your database name on line 7, and change utf8_swedish_ci to the collation of your choice | |
Props goes to this answer on StackOverflow: http://stackoverflow.com/a/19462205 | |
*/ | |
SELECT CONCAT("ALTER TABLE `", TABLE_NAME,"` CONVERT TO CHARACTER SET utf8 COLLATE utf8_swedish_ci;") AS mySQL | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA="YOUR_DATABASE_NAME" | |
AND TABLE_TYPE="BASE TABLE" |
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
#!/bin/bash | |
# Check if user is root | |
if [ $(id -u) != "0" ]; then | |
echo "Error: You must be root to run this script, please use root to install the software." | |
exit 1 | |
fi | |
apt-get remove libtidy-0.99-0 tidy | |
apt-get install git-core automake libtool checkinstall |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |