Skip to content

Instantly share code, notes, and snippets.

View ailinykh's full-sized avatar

Anthony Ilinykh ailinykh

  • Moscow, Russia
  • 21:35 (UTC +03:00)
View GitHub Profile
#!/bin/bash
USER='root'
PASSWORD='qwerty'
# function 1
function send_message_to_ip {
IP=$1
COUNT=$(ping -c 2 $IP | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
if [ $COUNT -eq 0 ]
<?php
/**
* Distance
*
* @return distance betweeb two points in meters
*/
public function distance($lat1,$long1,$lat2,$long2)
{
$greatCircleRadius = 6372795;