Skip to content

Instantly share code, notes, and snippets.

View mhrubel's full-sized avatar
💼
Open to Work

Mahamudul Hasan Rubel mhrubel

💼
Open to Work
View GitHub Profile
@mhrubel
mhrubel / ambn.php
Created February 8, 2019 14:06 — forked from AminulBD/ambn.php
Bangla WordPress Number
<?php
/*
Plugin Name: Bangla Number For WordPress
Plugin URI: https://aminul.net/
Description: Translate all number to bangla.
Version: 1.0.0
Author: Aminul Islam
Author URI: https://aminul.net/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
<?php
if (!defined("WHMCS"))
die("This file cannot be accessed directly");
function sendTelegramMessage($pm) {
global $vars;
//$chat_id = (""); //Group
$chat_id = (""); //Channel
$tokenbot = ("");
<?php
/**
* Display Client's Credit Balance in Client Area
*
* @author WHMCMS
* @link www.whmcms.com
* @since WHMCS v6.0.0+
*/
@mhrubel
mhrubel / no_admin_confirm.php
Created February 8, 2019 13:52 — forked from jclarke/no_admin_confirm.php
Disables the confirm password feature in the WHMCS admin area. Place in includes/hooks
<?php
add_hook('AdminLogin', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
});
add_hook('AdminAreaHeadOutput', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
return '
<script type="text/javascript">
$(document).ready(function(){
@mhrubel
mhrubel / update_billing_emails.php
Created February 8, 2019 13:48 — forked from Pierowheelz/update_billing_emails.php
Forces WHMCS to only send invoice related emails to the billing contact. This is done by temporarily updating the primary account's email address and contact info to that of the billing contact (ie. it's a hack). Add this to your .../includes/hooks/ folder.
<?php
if (!defined("WHMCS"))
die("This file cannot be accessed directly");
use WHMCS\Database\Capsule;
/*
* Temporarily updates the primary account's email address to that of the
* company's Billing contact upon creation of a new invoice so that invoices
* are not sent to the primary account holder.
@mhrubel
mhrubel / hostname.conf
Created February 8, 2019 13:43 — forked from Bharat-B/hostname.conf
WHMCS nGINX rules for SSL / Non SSL
### NON SSL | STANDARD HTTP
server {
listen 80;
server_name domain.com;
root /path/to/whmcs;
index index.php index.html;
access_log /var/log/nginx/domain.com.log combined;
access_log /var/log/nginx/domain.com.bytes bytes;
error_log /var/log/nginx/domain.com.error.log error;
location / {
@mhrubel
mhrubel / 01_postfix_installer.md
Created February 8, 2019 06:43 — forked from baronkis/01_postfix_installer.md
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube + Opendkim

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Ubuntu 18.04 LTS. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

What it does?

02_postfix.sh:

  • Install Postfix and configure it with TLS support.
  • Install Dovecot and configure it's transport on Postfix.
  • Download, extract and correct permissions for Postfixadmin.
  • Download, extract and correct permissions for Roundcube.