- Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
- If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
- Choose Create Hosted Zone.
- For Domain Name, type your domain name.
- Choose Create.
- Click the Hosted Zone, edit record set.
- In the value, add
ec2-54-152-134-146.compute-1.amazonaws.com. - Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
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 | |
| function get_youtube_video_ID($youtube_video_url) { | |
| /** | |
| * Pattern matches | |
| * http://youtu.be/ID | |
| * http://www.youtube.com/embed/ID | |
| * http://www.youtube.com/watch?v=ID | |
| * http://www.youtube.com/?v=ID | |
| * http://www.youtube.com/v/ID | |
| * http://www.youtube.com/e/ID |
The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.
Example:
# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
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
| function genScreenshot() { | |
| var canvasImgContentDecoded; | |
| html2canvas(document.body, { | |
| onrendered: function(canvas) { | |
| window.canvasImgContentDecoded = canvas.toDataURL("image/png"); | |
| } | |
| }); | |
| } | |
| genScreenshot(); |
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 | |
| define('DB_USERNAME', 'root'); | |
| define('DB_PASSWORD', 'Hoang123'); | |
| define('DB_NAME', 'session_example'); | |
| define('DB_SERVER', 'localhost'); | |
| /* Attempt to connect to MySQL database */ | |
| /** @var mysqli $mysqli */ | |
| $mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME); |
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 database with all procedures, functions, views & triggers along with the table structures and their data. | |
| mysqldump <other mysqldump options> --routines export.sql |
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
| <IfModule mod_rewrite.c> | |
| Options -MultiViews | |
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(.*)$ index.php [QSA,L] | |
| </IfModule> | |
| <IfModule !mod_rewrite.c> | |
| <IfModule mod_alias.c> | |
| RedirectMatch 302 ^/$ /index.php/ |
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
| $servername = "localhost"; | |
| $username = "root"; | |
| $password = ""; | |
| $dbname = "testusersdb"; | |
| $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); | |
| // set the PDO error mode to exception | |
| $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
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
| license: gpl-3.0 | |
| border: no | |
| height: 900 |