Skip to content

Instantly share code, notes, and snippets.

View asidko's full-sized avatar
🤠
Always ready!

Alexander Sidko asidko

🤠
Always ready!
  • Market Traders Institute
  • Kyiv, Ukraine
View GitHub Profile
@asidko
asidko / gzip.js
Created April 20, 2022 14:00
Encode and decode base64 GZIP with pure JavaScript. Works in all modern browsers.
// Paste the following example to browser console
// Comppreses string to GZIP. Retruns a Promise with Base64 string
const compress = string => {
const blobToBase64 = blob => new Promise((resolve, _) => {
const reader = new FileReader();
reader.onloadend = () => resolve(reader.result.split(',')[1]);
reader.readAsDataURL(blob);
});
@asidko
asidko / .gitlab-ci.yml
Created June 29, 2022 15:52
GitLab CI for Java Docker build with Gradle and push to Amazon ECR repository
# Project specific variables are here
variables:
# AWS ECR settings
AWS_REGION: us-east-1
AWS_IMAGE_REGISTRY: XXXXXXX.dkr.ecr.us-east-1.amazonaws.com
AWS_IMAGE_NAME: my-spring-boot-app
# Do not forget to set
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION
# in Gitlab Settings -> CI/CD
@asidko
asidko / append_note.applescript
Created June 13, 2023 08:17
Raycast script to append custom text to pre-configured Apple Note.
#!/usr/bin/osascript
# Required parameters:
# @raycast.author asidko
# @raycast.schemaVersion 1
# @raycast.title Note text to "Worklog" note
# @raycast.mode silent
# @raycast.packageName Notes
# @raycast.description Append text to pre defined note
# @raycast.argument1 { "type": "text", "placeholder": "text to append" }
@asidko
asidko / run.sh
Last active October 28, 2024 11:50
A simple application runner for managing the start/stop operations of binary executables on a Linux virtual machine (VM)
#!/bin/bash
##################################################
# Run script for applications
# Usage: ./run.sh start
# ./run.sh restart
# ./run.sh stop
# Features:
# - Auto-detect application name and port (based on folder name) and binary (last by creation date)
# - Automatically checks if the application is running, shows its last logs
@asidko
asidko / script.py
Last active October 11, 2024 21:32
Поиск найболее волатильных монет на Binance
##################################################
# Скрипт для поиска найболее волатильных монет на Binance
#
# Перед использованием, установить зависимости:
# pip install rich aiohttp
#
# Скриншот: https://github.com/user-attachments/assets/b22838f6-a130-4ffe-9f01-d09abbcc24cc
#
# Пример использования.
# Найти монеты которые изменились на 2% за последнюю 1 минуту в сравнении с последними 15 минутами