Skip to content

Instantly share code, notes, and snippets.

View mhrubel's full-sized avatar
🖥️
Programming

Mahamudul Hasan Rubel mhrubel

🖥️
Programming
View GitHub Profile
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@sudar
sudar / wp-increase-timeout.php
Created February 13, 2013 15:54
Increase the curl timeout in WordPress
<?php
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/
//adjustments to wp-includes/http.php timeout values to workaround slow server responses
add_filter('http_request_args', 'bal_http_request_args', 100, 1);
function bal_http_request_args($r) //called on line 237
{
$r['timeout'] = 15;
return $r;
}
@agarzon
agarzon / index.php
Last active January 10, 2021 01:03
WHMCS server status script
<?php
/*
*************************************************************************
* *
* WHMCS - The Complete Client Management, Billing & Support Solution *
* Copyright (c) WHMCS Ltd. All Rights Reserved, *
* Release Date: 24th November 2011 *
* Version 5.0 *
* *
*************************************************************************
@michenriksen
michenriksen / subdomains.lst
Last active December 25, 2023 12:54
Subdomain list for bruteforcing
0
01
02
03
0_
1
10
100
101
102
@jclarke
jclarke / no_admin_confirm.php
Last active November 27, 2021 13:03
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(){
@AminulBD
AminulBD / README.MD
Last active September 13, 2023 11:17
BD Domain ability checker with php.

(DOT) .BD DOMAIN ABILITY CHECKER

You can use this as WHMCS or other domain checker to check ability of .bd domains. This is a concept for how to create your own whois server.

WARNING: WHEN YOU USE THIS SCRIPT, YOU KNOW WHAT YOU ARE DOING. I'M NOT RESPONSIVE FOR ANY PROBLEM

First login to your server (Any distro) and install the following dependencies.

For ubuntu user:

apt-get install xinetd dnsutils php-cli

@Bharat-B
Bharat-B / hostname.conf
Created February 23, 2018 08:22
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 / {
@AminulBD
AminulBD / banglaSpellOut.php
Created May 18, 2018 12:23
Spell out money amount in bangla word.
<?php
/**
* Convert number to word in bangla
*
* @param int $number
* @param string $after
* @param string $before
* @return string
*/
function banglaSpellOut($number = 0, $after = '', $before = '')
@Pierowheelz
Pierowheelz / update_billing_emails.php
Last active May 12, 2021 06:40
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.
@AminulBD
AminulBD / address.json
Last active February 8, 2019 14:08
Bangladdesh divisions, districts and upazila list in php array and json
{
"Rajshahi": {
"Joypurhat": [
"Akkelpur",
"Joypurhat Sadar",
"Kalai",
"Khetlal",
"Panchbibi"
],
"Bogura": [