Add custom icons to MeshCentral (part 3 – styles)

Carrying on from part 2 (night mode), if you copy the stylesheet style.css from C:\Program Files\Open Source\MeshCentral\node_modules\meshcentral\public\styles (in my installation) to our custom directory (- in this case C:\Program Files\Open Source\MeshCentral\meshcentral-web\public\styles) and make a few adjustments, it’s a little prettier. These are the sections to change: .DevSt {padding: 15px !important;background: #333;border-radius: 10px 10px 0px 0px;margin-top: […]

Add custom icons to MeshCentral (part 1)

MeshCentral is great, but the icons are a little Windows 7. Luckily, the author Ylian Saint-Hilaire has added a simple way to change them. Go to your MeshCentral installation folder and navigate to \meshcentral-web\public\images – this might look something like this: C:\Program Files\Open Source\MeshCentral\meshcentral-web\public\images Then place the icons in the images folder. I have zipped […]

Summernote insert single line break instead of paragraph on pressing enter

I’ve seen a variety of discussions about this and none of them quite worked for me, so here is my version – working on the current (0.8.9) version. $(“#summernote”).summernote({ //your options }).on(“summernote.enter”, function(we, e) { $(this).summernote(“pasteHTML”, “<br><br>”); e.preventDefault(); }); We intercept the enter key, insert 2 breaks (required for new line) and prevent it from […]

PHPMailer NTLM (MS Exchange) SMTP authentication

PHPmailer does not work with NTLM authentication and insists on using mhash() which is deprecated – so you need to edit the file in /extras called ntlm_sasl_client.php Find the code that checks if mhash() is installed and replace the 3 mhashes with hash instead: || !function_exists($function = “mhash”) ) { $extensions = array( “mcrypt_encrypt” => […]

Convert HTML table to CSV

Just a quick one – I needed a script to convert a table to a csv, so this is what I came up with. See the annotations for notes: //html table is in variable $report $report = str_replace(array(“\n”, “\r”), “”, $report); //remove existing line breaks $report = str_replace(‘”‘, ‘\”‘, $report); //escape existing quote marks $csv_lines […]

WordPress Distributed Botnet Attack Blocker

After the recent global distributed botnet attack on WordPress installations that took down servers and broke into admin accounts, I thought I’d write a plugin to prevent it happening again. Distributed botnet attacks can come from multiple IP addresses and locations at the same time, so conventional IP-based lockouts are not effective (e.g. those found […]

Cover your Paypal fees

I just thought I’d share a formula I worked out a few years ago when a client asked me to make sure his Paypal website payments were covering the Paypal fees – so that he got the full amount he was asking for. In the UK, Paypal standard fees are 3.4% plus 20p. So if […]