Skip to content

Instantly share code, notes, and snippets.

View mghayour's full-sized avatar

M Ghayour mghayour

View GitHub Profile
@mghayour
mghayour / rathole_auto_install.sh
Last active February 6, 2025 11:49
Auto install and setup rathole client
#!/bin/bash
# Auto install rathole client
# Run this with sudo
# download it like this:
# wget https://gist.githubusercontent.com/mghayour/9138a22ed185ab3d99e840c3895742e6/raw/699a1aca8eca3ec54b632154a22f912338bf7b9a/rathole_auto_install.sh
# Ask user for input
read -p "Enter rathole remote like domain:port :" remote_addr
@mghayour
mghayour / is_rtl.php
Last active May 10, 2021 20:31 — forked from khal3d/is_rtl.php
Check if there RTL characters (Arabic, Persian, Hebrew)
<?php
/**
* Is RTL
* Check if there RTL characters (Arabic, Persian, Hebrew)
* this function works in fuzzy mode
*
* @author Khaled Attia <[email protected]> Mahdi Ghayour <[email protected]>
* @param String $string
* @return float betwwen 0~1, (0 for ltr and 1 for rtl)
* @example if( is_rtl($string) > 0.5 ) { // do sth }
@mghayour
mghayour / telegram_crash_reporter.php
Created April 8, 2017 21:45
this php file report php fatal errors to your telegram account
<?php
/*
this php file report php fatal errors to your telegram account
setup :
1- search for "//TODO: edit this" and edit that !
2- include it before all
3- enjoy debuging fast as possible
*/
function shutdown_report_it() {