Go to https://console.aws.amazon.com/ec2
Click on Launch Instance button to add new EC2
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
## Pre-requisite: You have to know your last commit message from your deleted branch. | |
git reflog | |
# Search for message in the list | |
# a901eda HEAD@{18}: commit: <last commit message> | |
# Now you have two options, either checkout revision or HEAD | |
git checkout a901eda | |
# Or | |
git checkout HEAD@{18} |
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 | |
$url = "https://www.google.com/"; | |
$curlObj = curl_init(); | |
curl_setopt($curlObj, CURLOPT_URL, $url); | |
curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($curlObj, CURLOPT_HEADER, 1); // must set this line | |
curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, false); | |
$result = curl_exec($curlObj); |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
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
Africa/Abidjan | |
Africa/Accra | |
Africa/Addis_Ababa | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
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
const data = [] | |
// using promise.all | |
const data = await Promise.all(data.map(async (item, index) => { | |
// call async function here | |
item.products = await asyncawaitfunction() | |
return item | |
})); |
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
#.ssh/config | |
Host domain.com | |
HostName [ip_addres] | |
User username | |
IdentityFile /path/to/pem/file/file.pem |
macOS install [email protected]
Since PHP 7.2
is not supported anymore, it's got delisted from the Hombrew core repository.
You've to find a third-party repository that still contains an older PHP version, such as the shivammathur/php
repository.
You need to tap the repository like this in your Homebrew:
brew tap shivammathur/php
NewerOlder