- 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 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
Error when try access gmail from php imap solution: | |
Login to your gmail account, enable imap. | |
Let the access here first: https://www.google.com/settings/security/lesssecureapps | |
Go to: https://accounts.google.com/b/0/DisplayUnlockCaptcha and enable access. | |
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 | |
function sign($method, $url, $data, $consumerSecret, $tokenSecret) | |
{ | |
$url = urlEncodeAsZend($url); | |
$data = urlEncodeAsZend(http_build_query($data, '', '&')); | |
$data = implode('&', [$method, $url, $data]); | |
$secret = implode('&', [$consumerSecret, $tokenSecret]); | |
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 | |
session_start(); | |
$code = $_GET['code']; | |
$url = 'https://github.com/login/oauth/access_token'; | |
$client_id = 'xxxxxxxxxxxxxxxxxxxxxxx'; | |
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
// echo $code; | |
$postdata = http_build_query( |
To start writing RestFull API in symfony we will need bundles:
"friendsofsymfony/oauth-server-bundle": "^1.6",
"friendsofsymfony/rest-bundle": "^2.7",
"friendsofsymfony/user-bundle": "^2.1",
"jms/serializer-bundle": "^3.5",
"nelmio/api-doc-bundle": "^3.5",
"sensio/framework-extra-bundle": "^5.2",
"symfony/apache-pack": "^1.0",
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
{ | |
// Usage: | |
// mv pub/static/frontend/Magento/luma/en_US pub/static/frontend/Magento/luma/en_US_orig | |
// r.js -o build.js baseUrl=pub/static/frontend/Magento/luma/en_US_origin dir=pub/static/frontend/Magento/luma/en_US | |
// Enable js minification with Uglify. Uncomment this out during development tomake builds faster | |
//optimize: 'none', | |
inlineText: true, | |
// Files that are required for all pages will be included in require.js file | |
deps: [ | |
'jquery/jquery.cookie', |
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 | |
$conn = mysqli_connect("HOST", "USER", "PASS", "DATABASE"); | |
if (!$conn) { | |
echo "Error: Unable to connect to MySQL." . PHP_EOL; | |
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; | |
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; | |
exit; | |
} |