- 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":.+?,'
| [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 *** |
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
| #!/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 |
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.
| #!/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" |
| 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):] ) |
| """ | |
| 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). |
| 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) |