Skip to content

Instantly share code, notes, and snippets.

View ShivKumarSaini's full-sized avatar
🎯
Focusing

Shiv Kumar ShivKumarSaini

🎯
Focusing
  • IBM
View GitHub Profile
@ShivKumarSaini
ShivKumarSaini / distance.sql
Created October 23, 2018 11:29 — forked from Usse/distance.sql
MySQL calculate distance between two latitude/longitude coordinates
CREATE FUNCTION `lat_lng_distance` (lat1 FLOAT, lng1 FLOAT, lat2 FLOAT, lng2 FLOAT)
RETURNS FLOAT
DETERMINISTIC
BEGIN
RETURN 6371 * 2 * ASIN(SQRT(
POWER(SIN((lat1 - abs(lat2)) * pi()/180 / 2),
2) + COS(lat1 * pi()/180 ) * COS(abs(lat2) *
pi()/180) * POWER(SIN((lng1 - lng2) *
pi()/180 / 2), 2) ));
END
@ShivKumarSaini
ShivKumarSaini / trial.md
Created July 12, 2018 07:26 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux Mint

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@ShivKumarSaini
ShivKumarSaini / Date Control.md
Last active April 10, 2018 10:40
Read/Write date value using ngModel in Input control.
@ShivKumarSaini
ShivKumarSaini / style.css
Last active April 9, 2018 11:44
Vertical allignment of text using CSS3
/**
Please have a look at this link:
>> https://stackoverflow.com/questions/79461/vertical-alignment-of-elements-in-a-div/45458436#45458436
*/
.immediate-parent-of-text-containing-div{
height: 50px; /* or any fixed height that suits you.*/
}
@ShivKumarSaini
ShivKumarSaini / coloredConsoleMessages.md
Created February 14, 2018 09:19
Colored console messages

It is based on JS. Use below code syntax to produce colored messages in console windows:

  console.log('%chello', 'color:aqua');