Skip to content

Instantly share code, notes, and snippets.

View ailinykh's full-sized avatar

Anthony Ilinykh ailinykh

  • 07:57 (UTC +03:00)
View GitHub Profile
@ailinykh
ailinykh / iOS Images
Created February 24, 2015 11:28
Photoshop script to resize images for iOS app
try {
doc = app.activeDocument;
if (doc == null)
{
throw "Something is wrong with the current active document. Make sure it's a valid PSD file.";
}
var fileName = prompt("Enter file name please", doc.name);
#!/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;