Skip to content

Instantly share code, notes, and snippets.

View mrladeia's full-sized avatar
🎯
Focusing

Marcos Rodrigo Ladeia mrladeia

🎯
Focusing
View GitHub Profile
@khal3d
khal3d / is_rtl.php
Last active September 15, 2022 03:26
Check if there RTL characters (Arabic, Persian, Hebrew)
<?php
/**
* Is RTL
* Check if there RTL characters (Arabic, Persian, Hebrew)
*
* @author Khaled Attia <[email protected]>
* @param String $string
* @return bool
*/
@macmladen
macmladen / IPtables and csf.md
Last active June 28, 2022 06:35
Handling firewall blocking and unblocking, iptables, csf
@jamesramsay
jamesramsay / README.md
Last active August 14, 2024 18:26
Gmail: delete old emails automatically

Gmail: delete old emails automatically

Automatically deletes old emails that match the specified label.

Get started

  • Create a new Google Apps Script at https://script.google.com
  • Overwrite the placeholder with the javascript below
  • Update the following constants:
  • LABEL_TO_DELETE: the label that should be have old messages deleted
#!/bin/bash
set -e
# REQUIRED ACTION: Configure your backup server vars - see OVH Server Manager's "Backups" tab.
# BACKUP_HOST_PREFIX: use the prefix domain for the listed "Name" value on the "Backups" tab.
# Example: With a 'Name' value `ftpback-bhs1-3.ip-111-222-333.net` you would need to set `BACKUP_HOST_PREFIX=ftpback-bhs1-3`
# Add something likethese to your ~/.bashrc - /etc/profile
#export OVH_SERVER_ID="ns5xxxxx.ip-x-x-x.net"
#export BACKUP_HOST_PREFIX="ftpback-bhs1-x"
@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 }