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
| ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new pass'; |
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
| sudo mkdir storage/framework/cache && | |
| sudo mkdir storage/cms/combiner && | |
| sudo mkdir storage/cms/cache && | |
| sudo mkdir storage/cms/twig && | |
| sudo mkdir storage/framework/sessions && | |
| sudo mkdir storage/cms/cache && | |
| sudo mkdir storage/framework/views | |
| sudo chmod -R 775 artisan && |
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
| <?php | |
| /** | |
| * QR Code + Logo Generator | |
| * | |
| * http://labs.nticompassinc.com | |
| */ | |
| $data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com'; | |
| $size = isset($_GET['size']) ? $_GET['size'] : '200x200'; | |
| $logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE; |
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
| <?php | |
| /** | |
| * QR Code + Logo Generator | |
| * | |
| * http://labs.nticompassinc.com | |
| */ | |
| $data = isset($_GET['data']) ? $_GET['data'] : 'https://tunlookup.com/'; | |
| $size = isset($_GET['size']) ? $_GET['size'] : '200x200'; | |
| $logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE; | |
| header('Content-type: image/png'); |
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
| server { | |
| listen 80; | |
| server_name .example.co.uk.dev; | |
| access_log /usr/local/var/log/nginx/example.co.uk-access.log; | |
| error_log /usr/local/var/log/nginx/example.co.uk-error.log error; | |
| root /var/www/example.co.uk/public; | |
| index index.php index.html; |
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
| <?php | |
| /** | |
| * Convert datetime in db into local datetime | |
| * @param string $datetime | |
| * @param string $format | |
| * @param string $timezone | |
| * @return String | |
| */ | |
| public static function convert_datetime_to_local($datetime, $format = 'H:i d-m-Y', $timezone = 'Asia/Ho_Chi_Minh') | |
| { |
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
| # export postgres db | |
| pg_dump -p [post] -U [username] -h [host] -d [db_name] > dbexport.pgsql | |
| # import postgres db | |
| psql -p [post] -U [username] -h localhost [dbname] < dbexport.pgsql |
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
| CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass'; | |
| GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION; | |
| FLUSH PRIVILEGES; | |
| ## remote connection - not secure | |
| CREATE USER 'admin'@'%' IDENTIFIED BY 'some_pass'; | |
| GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION; | |
| FLUSH PRIVILEGES; |
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
| sudo update-alternatives --config php | |
| sudo service nginx restart | |
| sudo service php7.2-fpm restart |
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
| Run this | |
| "sudo -u postgres psql" | |
| in your terminal to get into postgres | |
| postgres=# | |
| Run "CREATE USER new_username;" | |
| Note: Replace new_username with the user you want to create, |