git reflog
Using the git reflog command should reveal Git's internal diary of all of the commits that HEAD has pointed to in your local repository—even the ones you thought were lost forever (assuming they weren’t old enough to have expired).releases
or version
numbers.
Lightweight tags:
git tag v1.0.0 // tags for previous commits (refers to the last commit)
git tag v1.0.0 <commit-hash> // tag for specific commit
Annotated tags:
git tag -a v1.0.0 -m "Version 1.0.0 release"
checkout to tag:
git checkout v1.0.0
git checkout master // to return the last commits again
Listing all tags:
git tag
Deleting a tag: // deletes only tag - not commits
git tag -d v1.0.0
Create a tag for a branch:
git tag v1.0.0 master
push tag to a remote repository
git push origin v1.0.0
$start = microtime(true);
sleep(3);
// Your script code here
$end = microtime(true);
$latency = round($end - $start, 2);
echo "Script execution time: " . $latency . " seconds";
The round
function will round the result to 2
decimals$password = "your_password";
Hash the password with cost factor 9
$start9 = microtime(true);
$hash9 = password_hash($password, PASSWORD_BCRYPT, ['cost' => 9]);
$end9 = microtime(true);
$executionTime9 = $end9 - $start9;
Hash the password with cost factor 10
$start10 = microtime(true);
$hash10 = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]);
$end10 = microtime(true);
$executionTime10 = $end10 - $start10;
Calculate the speedup factor
$speedupFactor = $executionTime10 / $executionTime9;
// Display the hashed passwords, execution times, and speedup factor
echo "Hashed password with cost 9: " . $hash9 . "\n";
echo "Execution time with cost 9: " . $executionTime9 . " seconds\n\n";
echo "Hashed password with cost 10: " . $hash10 . "\n";
echo "Execution time with cost 10: " . $executionTime10 . " seconds\n\n";
echo "Speedup factor (9 vs 10): " . $speedupFactor . " times faster\n";
12<img src="https://sibrdzne.ge/d1_images/logo.png" alt="Logo" class="image">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a nunc at ante eleifend tempor. In vel ullamcorper tellus, et vulputate metus. Integer pulvinar, ipsum in efficitur fringilla, dolor lacus sollicitudin tortor, vitae tincidunt nunc elit id ipsum. Proin laoreet, est ut placerat sollicitudin, lectus mi pellentesque est, vel accumsan velit sem id felis.
<p>New P</p>
asdjaosdjasiodjaio sdj
edit 4
last line edited 6let requestPromise = return new Promise(function (resolve, reject) {
$.ajax({
url: url,
type: "POST",
data: data,
// ...
success: function success(response) {
resolve(response);
}
// ...
})
});
you need to make sure to await this promise inside async function
before any page reload is executed
async function waitResponse(request_promise){
let response = await request_promise;
if(response.success == true){
// DO WHATEVER YOU WANT WITH THE RESPONSE
window.history.back(); // <--- and after that u can reload or go back to page or whatever
}
}
}
waitResponse(requestPromise);
cURL
request
To http://10.0.0.1/api/sms?PersonalID=19011111114
With headers:
Channel-Name: SMS
Authorization: 9s2EkGCDhv3eVwQY5BPSc
curl -H "Channel-Name: SMS" -H "Authorization: 9s2EkGCDhv3eVwQY5BPSc" "http://10.0.0.1/api/Sms?PersonalID=19011111114"