If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| <?php | |
| /* | |
| * Mysql database class - only one connection alowed | |
| */ | |
| class Database { | |
| private $_connection; | |
| private static $_instance; //The single instance | |
| private $_host = "HOSTt"; | |
| private $_username = "USERNAME"; | |
| private $_password = "PASSWORd"; |
| require "../config.php"; | |
| require "../common.php"; | |
| try { | |
| $connection = new PDO($dsn, $username, $password, $options); | |
| $new_user = array( | |
| "firstname" => $_POST['firstname'], | |
| "lastname" => $_POST['lastname'], | |
| "email" => $_POST['email'], |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
| https://jsfiddle.net/lesson8/HkEuf/1/ |
| For the fun of it, I tested the performance of the following: | |
| 1. json_decode('{}'); | |
| 2. new StdClass(); | |
| 3. (object)[]; |
| sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5000 |
| set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
| set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
| or | |
| SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); |
| Step 1 – Add Node.js PPA | |
| curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
| Step 2 – Install Node.js on Ubuntu | |
| sudo apt-get install nodejs | |
| Step 3 |
| sudo curl -s https://getcomposer.org/installer | php | |
| sudo mv composer.phar /usr/local/bin/composer |