Skip to content

Instantly share code, notes, and snippets.

View ailinykh's full-sized avatar

Anthony Ilinykh ailinykh

  • Moscow, Russia
  • 05:22 (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);
<?php
/**
* Distance
*
* @return distance betweeb two points in meters
*/
public function distance($lat1,$long1,$lat2,$long2)
{
$greatCircleRadius = 6372795;
#!/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 ]
@ailinykh
ailinykh / burgers.json
Last active March 28, 2016 10:50
karlburgers
[
{
"id": 1,
"title": "Карл-Бургер",
"description": "Фирменный бургер с говяжьей котлетой, беконом и луковым джемом.",
"price": 220,
"image_url": "http://deliverywiget.iiko.ru/Content/User/65cc66cc-c04e-11e5-80c3-d8d385655247/20abce00-85f2-45c3-a034-4da16724c373_Medium_.png"
},
{
"id": 2,
@ailinykh
ailinykh / video_to_gif.sh
Last active August 28, 2017 15:46
Bash script converts your videos into gif
#!/bin/bash
#
# Usage: ./video_to_gif.sh video.mp4
#
TARGET_FILE=$1
if [[ -z $TARGET_FILE ]]; then
echo "usage: video_to_gif.sh <target_file>"
echo "\ttarget_file - video file to convert into gif"
exit 1
// ==UserScript==
// @name Recon Helper
// @namespace http://tampermonkey.net/
// @version 0.1.2
// @description Simplify portal approving!
// @author Anthony Ilinykh
// @match https://opr.ingress.com/recon
// @grant none
// @updateURL https://gist.github.com/ailinykh/6125126a337f7b911ee5498da18cacb4/raw/recon_helper.user.js
// ==/UserScript==
@ailinykh
ailinykh / Gemfile
Created October 1, 2018 19:50
Dino paintings for your children
source 'https://rubygems.org' do
# Gems here
gem 'rmagick'
end
@ailinykh
ailinykh / main.py
Created March 16, 2019 12:21
Python file renaming
from os import walk, path, rename
import re
def main():
for (_, _, filenames) in walk('.'):
for file in filenames:
if file.endswith('.png'):
name = re.sub('\-Arb', '_RTL', file)
rename(file, name)
@ailinykh
ailinykh / no-direct.user.js
Last active June 13, 2022 13:48
Yandex Direct Removing
// ==UserScript==
// @name Yandex Direct Remover
// @namespace https://gist.github.com
// @version 0.3.9
// @description Remove yandex direct ad from all pages!
// @author Anthony Ilinykh
// @match *://*/*
// @grant none
// @updateURL https://gist.github.com/ailinykh/18f95f08ac8cf3111e79c9b204a84cc6/raw/no-direct.user.js
// ==/UserScript==
@ailinykh
ailinykh / top 200
Created April 13, 2017 15:56
Top Russian Passwords
123456
123456789
qwerty
111111
1234567
666666
12345678
7777777
123321
0