Skip to content

Instantly share code, notes, and snippets.

View asakasinsky's full-sized avatar

Vasily Asakasinsky asakasinsky

View GitHub Profile
This file has been truncated, but you can view the full file.
[Adblock Plus 2.0]
! Checksum: 60YS620PldQuM7K2FQP0lw
! Version: 202508111701
! Title: RU, UA, UZ, KZ
! Last modified: 11 Aug 2025 17:01 UTC
! Expires: 1 days (фильтр обновляется автоматически каждые 2 дня)
! Homepage: https://forums.lanik.us/viewforum.php?f=102
!
!
! *** ruadlist:advblock.txt ***
@asakasinsky
asakasinsky / readme.md
Created June 5, 2025 13:14 — forked from SanariSan/readme.md
Telegram HTTP bot API via CURL | Send text, photos, documents, etc.

Here are some examples on how to use Telegram bot api via CURL

Prerequisites

For getting messages in private chat with bot

  • Create a bot using @BotFather, get it's token
  • Start conversation with bot
  • Run following curl command
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
@asakasinsky
asakasinsky / ytdlp_nest_comments.py
Created March 24, 2025 12:47 — forked from tinyapps/ytdlp_nest_comments.py
Convert YouTube comments from an info.json file (acquired via yt-dlp --write-comments) to HTML.
#!/usr/bin/env python3
"""
Forked and modified from pukkandan/ytdlp_nest_comments.py:
https://gist.github.com/pukkandan/ee737fec64822f2552caf3ca4cbf5db7
which included this license and copyright information:
"SPDX-License-Identifier: MIT https://opensource.org/licenses/MIT
Copyright © 2021 [email protected]"
Convert YouTube comments from an info.json file (acquired via
@asakasinsky
asakasinsky / _CLI_Elasticsearch_Analysis.md
Created March 12, 2025 20:13 — forked from dcode/_CLI_Elasticsearch_Analysis.md
Analyze Elasticsearch on command line using HTTPie and jq

README

Especially when developing new query logic, it's helpful to query elasticsearch from the command line. If your Elasticsearch cluster uses SAML authentication or some other SSO, it's not simple or sometimes not even possible to query using curl directly. I wrote an auth plugin for HTTPie that should greatly simplify this process if you have rights to create API keys via the Kibana dev console (talk to your administrator and see the link below).

This process is also super handy for shell scripting because you can provide fine-grained limits of what your API key can do, making their use much safer and easier to manage than embedding native realm username/passwords.

@asakasinsky
asakasinsky / install_zellij.sh
Created December 25, 2024 19:49 — forked from BaksiLi/install_zellij.sh
Install Zellij (latest release) on Linux (incl. Ubuntu) and Darwin
#!/bin/bash
# Get the architecture of the machine
arch=$(uname -m)
os=$(uname -s)
# Download the Zellij binary
if [ "$os" == "Darwin" ]; then
filename="zellij-${arch}-apple-darwin.tar.gz"
url="https://github.com/zellij-org/zellij/releases/latest/download/$filename"
@asakasinsky
asakasinsky / ssh_forwarding_cheatsheet.md
Created November 20, 2024 14:25 — forked from jezeniel/ssh_forwarding_cheatsheet.md
SSH Agent Forwarding cheatsheet

Using the ssh agent

The following would show a similar output if a key is already added to your agent, and you are good to go.

$ ssh-add -l
2048 d7:8e:3d:03:9c:4f:f8:9d:04:0f:11:c5:24:e1:2f:3a rsa w/o comment (RSA)

The following will show if no agent is running.

@asakasinsky
asakasinsky / remote-edit.py
Created September 26, 2024 15:52 — forked from unixmonkey/remote-edit.py
A SublimeText 2 Plugin to auto-scp files to an ssh server on save http://net.tutsplus.com/tutorials/python-tutorials/how-to-create-a-sublime-text-2-plugin/
import sublime_plugin, os
class RemoteEdit(sublime_plugin.EventListener):
def on_post_save(self, view):
remote = { "/local/path/to/project": "/usr/bin/scp '$1' username@remote_host:'/remote/path/to/project$2'" }
for dirname, target in remote.iteritems():
if view.file_name().startswith( dirname ):
target = target.replace( "$1", view.file_name() )
target = target.replace( "$2", view.file_name()[len(dirname):] )
@asakasinsky
asakasinsky / rm_lines_by_num_sed.md
Created September 18, 2024 18:17 — forked from nilforooshan/rm_lines_by_num_sed.md
sed: Delete lines by line numbers

Delete lines by line numbers

Example 1: Delete lines 1, 3 and 5.

sed -e '1d;3d;5d' $filename

Example 2: Delete line 1.

@asakasinsky
asakasinsky / gitlab_migrate.py
Created August 20, 2024 20:47 — forked from mjnaderi/gitlab_migrate.py
Migrate from gitlab.com to self-hosted gitlab
"""
We used this script to migrate from gitlab.com to our self-hosted gitlab.
Author: Mohammad Javad Naderi
Before running the script, install `python-gitlab` package.
Important Note:
In order to keep the authors of merge requests and comments, before running this script make
sure all users have enabled "Public Email" in their gitlab.com profile and create account for
all users in self-hosted Gitlab (with the same e-mail address as their gitlab.com public email).
@asakasinsky
asakasinsky / gh-mirror.py
Created August 20, 2024 20:47 — forked from pcheng17/gh-mirror.py
Script for mirroring repositories
import os
import subprocess
import requests
import logging
from logging.handlers import RotatingFileHandler
logger = logging.getLogger("gh-mirror.py")
logfile = os.path.join(os.path.dirname(__file__), "logs", "gh-mirror.log")
logdir = os.path.dirname(logfile)