Skip to content

Instantly share code, notes, and snippets.

View bobbravo2's full-sized avatar
🏠
Working from home

Bob Gregor bobbravo2

🏠
Working from home
  • Boston, MA
  • 10:19 (UTC -04:00)
View GitHub Profile
// Stops people putting in Invalid nameservers
var nameserver = /^((([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z]{2,6})|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))$/i;
$('#configure_domains_form').submit(function() {
if (validNameserver($('input[name="domainns1"]')) && validNameserver($('input[name="domainns2"]')) && validNameserver($('input[name="domainns3"]')) &&
validNameserver($('input[name="domainns4"]'))){
return true;
}else{
return false;
}
});
<?php
/**
* WHMCS Licensing Cron Hook
* Automatically suspends overdue
* WHMCS Support & Updates Addons
* @license GPL V3 <http://www.gnu.org/licenses/>
*
* Copyright (C) 2013 Robert Gregor
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@bobbravo2
bobbravo2 / gist:7148698
Created October 25, 2013 02:41
WHMCS 5.2.10 Masspay exploit patch. add the following to your sites configuration.php file at the end
if (isset($_GET['action']) && 'masspay' == $_GET['action']) {
die('Mass pay is currently disabled. Please pay each invoice manually');
}
<?php
class myPlugin {
function __construct (){
add_action('init', array($this, 'init'));
}
function init (){
//Called on wp_init hook
}
}
new myPlugin();
if ( php_sapi_name() == 'cli' ) {
//Show errors on WHMCS Cron Job
$display_errors = true;
} else {
//Hide for production
$display_errors = false;
}
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="671" colspan="4" valign="top">
<p><strong>THURSDAY, Sept 15th</strong><br />
The first day of the conference starts with continental breakfast during the registration hour. Exhibits will be open during registration, breaks and lunch.</p>
</td>
</tr>
<tr>
<td width="97" valign="top">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery Calculator</title>
<!-- Added link to the jQuery Library -->
<script src="https://code.jquery.com/jquery-2.2.3.js" integrity="sha256-laXWtGydpwqJ8JA+X9x2miwmaiKhn8tVmOVEigRNtP4=" crossorigin="anonymous"></script>
<!-- Added a link to Bootstrap-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Click Button with Firebase!</title>
</head>
<body>
<!-- Text with spanID that gets filled with content -->
<p>After clicking, go to the firebase database to see the click counter go up.</p>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Click Button with Firebase!</title>
<!-- -->
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CountDown Button with Firebase!</title>
<!-- Firebase Reference -->
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>
</head>
<body>