This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> |
This file contains 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
FILENAME='./mysql_add_user.tmp.sql' | |
touch FILENAME; | |
echo "CREATE USER '$1'@'localhost' IDENTIFIED BY '$2';" >> FILENAME; | |
echo "GRANT ALL PRIVILEGES ON * . * TO '$1'@'localhost';" >> FILENAME; | |
echo "FLUSH PRIVILEGES;" >> FILENAME; | |
echo " 🔊 Adding $1 to mysql users"; | |
sudo mysql -u root -p < FILENAME; | |
rm FILENAME; |
This file contains 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
<?php | |
// functions.php | |
function get_reading_time($content, $words_per_minute = 300): int { | |
$striped = strip_tags($content); | |
$words = explode(' ', $striped); | |
return round(sizeof($words) / $words_per_minute); |
OlderNewer