This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var urlList = [], xmlhttp = [null, null]; | |
[].map.call(document.querySelectorAll('#listaccts tr'), function(e){ | |
var | |
domain = e.querySelector(':scope a[title^="Browse to the"]'), | |
username = e.querySelector(':scope > td:nth-child(5)'), | |
account = []; | |
if (username) account.push(username.innerText); | |
if (domain) account.push(domain.getAttribute('href')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Takes this output from CakePHP: | |
<div class="row"> | |
<div class="col-md-2"> | |
<select name="scheduled_start[year]" class="form-control"><option ...></select> | |
</div> | |
<div class="col-md-2"> | |
<select name="scheduled_start[month]" class="form-control"><option ...></select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* To use just login to your WHM and go to MultiPHP Manager. | |
* This is where all FPM pool options are defined. Just copy the code below | |
* and paste it into your browsers dev tools console. | |
* | |
* To change the FPM Pool confs after you've pasted the code into your console and pressed enter to run it. | |
* You can then tell it to change the confs here is the code to execute the process: | |
* | |
* Documentation: window.setFpmPools('[MAX CLIENTS]', '[IDEL TIMEOUT]', '[MAX REQUESTS]'); | |
* Real Example: window.setFpmPools( '5' , '15' , '100' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* FontAwesome Selection Input | |
* | |
* This will extend a select input into a font awesome icon selector. | |
* | |
* @author Matthew Dunham <[email protected]> | |
* @copyright Hot Coffey Design 2018 - http://hotcoffeydesign.com/ | |
*/ | |
(function($){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calcCrow(lat1, lon1, lat2, lon2) { | |
var R = 6371; // km | |
var dLat = toRad(lat2 - lat1); | |
var dLon = toRad(lon2 - lon1); | |
var lat1 = toRad(lat1); | |
var lat2 = toRad(lat2); | |
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + | |
Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2); | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); |
OlderNewer