Skip to content

Instantly share code, notes, and snippets.

View ailinykh's full-sized avatar

Anthony Ilinykh ailinykh

  • 23:51 (UTC +03:00)
View GitHub Profile
//
// Analytic.swift
// YouDrive
//
// Created by Anton Ilinykh on 27.06.2022.
//
import Foundation
enum Event: String {
@ailinykh
ailinykh / main.swift
Last active June 13, 2023 10:24
Yandex Contest
// let str = readLine(strippingNewline: true)!
// let arr = str.split(separator: " ")
// print(Int64(arr[0])! + Int64(arr[1])!)
// import Foundation
// var text = try! String(contentsOfFile: "input.txt")
// _ = text.popLast()
// let arr = text.split(separator: " ")
// try! "\(Int64(arr[0])! + Int64(arr[1])!)".write(to: URL(fileURLWithPath: "output.txt"), atomically: true, encoding: .utf8)
@ailinykh
ailinykh / top 200
Created April 13, 2017 15:56
Top Russian Passwords
123456
123456789
qwerty
111111
1234567
666666
12345678
7777777
123321
0
@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 / 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 / Gemfile
Created October 1, 2018 19:50
Dino paintings for your children
source 'https://rubygems.org' do
# Gems here
gem 'rmagick'
end
// ==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 / 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
@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,
#!/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 ]