Skip to content

Instantly share code, notes, and snippets.

View cybertiwari's full-sized avatar
🎯
Focusing

Sunil Tiwari cybertiwari

🎯
Focusing
View GitHub Profile
<div class="mb-5">
@if (session('success'))
<div x-data="{ show: true }" x-show="show"
class="relative flex items-center border p-3.5 rounded before:absolute before:top-1/2 ltr:before:left-0 rtl:before:right-0 rtl:before:rotate-180 before:-mt-2 before:border-l-8 before:border-t-8 before:border-b-8 before:border-t-transparent before:border-b-transparent before:border-l-inherit text-success bg-success-light !border-success ltr:border-l-[64px] rtl:border-r-[64px] dark:bg-success-dark-light">
<span class="absolute ltr:-left-11 rtl:-right-11 inset-y-0 text-white w-6 h-6 m-auto">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg" class="w-6 h-6">
<path
d="M19.0001 9.7041V9C19.0001 5.13401 15.8661 2 12.0001 2C8.13407 2 5.00006 5.134
@cybertiwari
cybertiwari / calculateDistance.php
Created October 31, 2021 16:14
Calculate distance between two latitude and longitude in php using the Great-circle distance formulae
<?php
function calculateDistance($firstLatitude, $firstLongitude, $secondLatitude,$secondLongitude)
{
//get polar angle θ (theta) (angle with respect to polar axis)
$theta = $firstLongitude - $secondLongitude;
$radians = sin(
deg2rad($firstLatitude)
) * sin(