Skip to content

Instantly share code, notes, and snippets.

View mdestafadilah's full-sized avatar
🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.

mDestaFadilah mdestafadilah

🧠
I'm an Intuiting Ekstrovert (IE) with B Blood Type.
View GitHub Profile
@mdestafadilah
mdestafadilah / aaPanel cron job for email server on Ubuntu 20.04
Last active January 18, 2024 02:35 — forked from idflorin/aaPanel cron job for email server on Debian 10
Cron job for aapanel check systemctl status dovecot rspamd postfix telegram
#!/bin/bash
SERVICE="dovecot"
if (systemctl is-active $SERVICE)
then
echo "$SERVICE is running"
# curl -s "https://api.telegram.org/bot5233333629:AXDDDDDDDxqVTr_SWhh8SGo/sendMessage?chat_id=17522222222208&text='$SERVICE is running'"
else
echo "$SERVICE stopped"
# curl -s "https://api.telegram.org/bot5233333629:AXDDDDDDDxqVTr_SWhh8SGo/sendMessage?chat_id=17522222222208&text='$SERVICE 193.187.129.202:31202/b066ea5s6m202 stopped!!!'"
# uncomment to start rspamd if stopped
@mdestafadilah
mdestafadilah / gfonts.php
Created March 15, 2018 04:08 — forked from nikoskip/gfonts.php
Demo: http://nikoskip.me/gfonts.php | You only have to use the CSS import URL that Google gives you, for instance: http://fonts.googleapis.com/css?family=Cabin:500,700,500italic,700italic
<?php
$fontTypes = array('woff2', 'woff', 'ttf', 'svg', 'eot');
$gFontURL = 'http://fonts.googleapis.com/css?family=';
$uaFonts = array(
'woff2' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36',
'woff' => 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)',
'ttf' => 'Mozilla/5.0 (Linux; U; Android 2.2.1; en-ca; LG-P505R Build/FRG83) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',
'svg' => 'Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10',