Skip to content

Instantly share code, notes, and snippets.

View mrmuminov's full-sized avatar
🎯
Focusing

Bahriddin Mo'minov mrmuminov

🎯
Focusing
  • Dataprizma LLC
  • Uzbekistan / Andijan
  • 23:26 (UTC +05:00)
View GitHub Profile
@mrmuminov
mrmuminov / loop-check.php
Created December 29, 2023 10:38
Uz Railway ticket checker
<?php
function makeRequest() {
$url = 'https://eticket.railway.uz/api/v3/trains/availability/space/between/stations';
$headers = [
'Accept: application/json',
'Accept-Language: uz',
'Connection: keep-alive',
'Content-Type: application/json',
'Cookie: __stripe_mid=8d265b71-b9cf-47c1-9fd7-98a84ff3d0321f300a; G_ENABLED_IDPS=google; XSRF-TOKEN=836127f7-4efb-45e5-ade1-b63928e34109',
'Origin: https://eticket.railway.uz',
@mrmuminov
mrmuminov / openssl.md
Last active January 11, 2024 13:17
Asymmetric encryption with OpenSSL PHP extension

Asymmetric Encryption with OpenSSL PHP Extension

This guide demonstrates how to perform asymmetric encryption using the OpenSSL PHP extension. Asymmetric encryption involves the use of a pair of keys – a public key for encryption and a private key for decryption. Below are the steps to generate keys, encrypt and decrypt data.

Step 1: Generate Keys

// Generate a new key pair with a private key size of 4096 bits
$result = openssl_pkey_new([
 "private_key_bits" =&gt; 4096,
@mrmuminov
mrmuminov / generic.md
Last active July 13, 2023 19:45
PHP swagger. Generic response

Parent (Base, Main) response schema

#[OA\Schema]
class BaseResponse {
    #[OA\Property]
    public ?string $message = null;
    #[OA\Property(type: 'object')]
    public mixed $result = null;     
}
@mrmuminov
mrmuminov / find-parents-list.js
Last active September 23, 2022 18:50
Find children parents
const datas = {
'children': [
{
'name': '1',
'children': [
{'name': '1.1'},
{'name': '1.2'},
{
'name': '1.3',
'children': [
@mrmuminov
mrmuminov / youtube.md
Last active April 5, 2023 04:59
Dasturlash darslariga havolalar

Youtube channels

# Channels Texnologiyalar
1 Alitech HTML, Javascript, ES6, JQuery, CSS, Bootstrap, Sass, ReactJS, Ilustrator, ...
2 Botir Ziyatov HTML5, Python, Telegram Bot (python), Django, Server, ...
3 Code Leader PHP, GIT, HTML&HTML5, MySQL, Bootstrap, ...
4 Farkhod Dadajanov Windows, Linux, Cisco, Agular, SQL, Javascript, Ma'lumotlar tuzilmasi, NodeJS(full), GIT, Tensorflow, MongoDB, Docker, Go, ASP.Net Core, Compyuter Visoin, ReactJS, ...
5 [Javohir Group](https://www.youtube.
@mrmuminov
mrmuminov / ffmpeg-watermark.md
Created July 17, 2021 05:17 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@mrmuminov
mrmuminov / command.sh
Last active April 2, 2021 06:07
Remote backup of PostgreSQL, MySQL via SSH
***
*** of PostgreSQL
ssh user@host "pg_dump -U db_user -h localhost -C --column-inserts" \ > dblocal.sql.gz
*** of MySQL
ssh user@host "mysqldump -u db_user -p db_name | gzip -9" > dblocal.sql.gz