Skip to content

Instantly share code, notes, and snippets.

View m3y54m's full-sized avatar
🎯
Focusing

Meysam Parvizi m3y54m

🎯
Focusing
View GitHub Profile
@m3y54m
m3y54m / extract_farsi_audio.bat
Last active July 21, 2023 09:53
Batch extract audio file of a specific language from MKV files (Using MKVToolNix)
REM Batch extract audio of a specific language (Farsi) from MKV files - Using mkvmerge
FOR /F "delims=*" %%A IN ('dir /b *.mkv') DO "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "farsi_audio_%%A.mka" -D -S -a fa "%%A"
PAUSE
@m3y54m
m3y54m / build-opencv4-in-ubuntu.md
Last active February 3, 2023 21:49
Build OpenCV 4 in Ubuntu

Build OpenCV 4 in Ubuntu

Install prerequisites

sudo apt update && sudo apt install -y cmake g++ wget

Download latest version of OpenCV 4 from GitHub

@m3y54m
m3y54m / github-webhook-verification.php
Created February 3, 2023 16:29
GitHub Webhook Secret Verification
<?php
// Content-type in github webhook settings should be x-www-form-urlencoded
// It's better to be exported as an environment variable or in a .env file.
define("GITHUB_WEBHOOK_SECRET", "write your github webhook secret here");
$body = file_get_contents("php://input");
function verifySignature($body)
{
@m3y54m
m3y54m / ANSI-color-codes.h
Created January 28, 2023 14:35 — forked from RabaDabaDoba/ANSI-color-codes.h
The entire table of ANSI color codes working in C!
/*
* This is free and unencumbered software released into the public domain.
*
* For more information, please refer to <https://unlicense.org>
*/
//Regular text
#define BLK "\e[0;30m"
#define RED "\e[0;31m"
#define GRN "\e[0;32m"
@m3y54m
m3y54m / terminal-proxy-settings.md
Last active April 15, 2025 08:22
Set Proxy in Terminal (Bash, CMD, PowerShell, etc.)
@m3y54m
m3y54m / GitConfigHttpProxy.md
Created November 22, 2022 12:37 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@m3y54m
m3y54m / decode_base64.sh
Created November 19, 2021 15:17
Decode Multiple Files From Base64 (Bash Script)
#!/bin/bash
mkdir -p decode
for f in *.txt
do
base64 --decode "$f" > "decode/$f"
done
@m3y54m
m3y54m / gist:1bfe8ae84590c1d597465584489ed67c
Created October 4, 2021 11:54
Git commit with comment + multi-line description
git commit -m "Short comment" -m $'Long description first line \n Second Line \n Third line'