- Ubuntu 20.04 (18.04, 16.04 works the same)
- Apache 2.4.18 or higher
- OpenSSL 1.0.2g-1ubuntu4.10 or higher
- e.g. LetsEncrypt certificate
OS: Ubuntu 20.04 Apache/2.4.18 1.0.2g-1ubuntu4.10 +
/* eslint-disable no-var,no-console */ | |
// detect unused CSS selectors | |
(function() { | |
var parsedRules = parseCssRules(); | |
console.log('Parsed CSS rules:', parsedRules); | |
detectDuplicateSelectors(parsedRules); | |
var selectorsToTrack = getSelectorsToTrack(parsedRules); | |
window.selectorStats = { unused: [], added: [], removed: [] }; | |
console.log('Tracking style usage (inspect window.selectorStats for details)...'); |
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Create Custom Yoast Sitemap | |
* Credit: Unknown | |
* Last Tested: Unknown | |
********* | |
* HOW TO USE | |
* Replace TYPE with your custom type | |
*/ |
<?php | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
OLD stuff. This was not enough for an A+ anymore. |
#!/bin/sh | |
## backup each mysql db into a different file, rather than one big file | |
## as with --all-databases. This will make restores easier. | |
## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
## Create the user and directories | |
# mkdir -p /var/backups/mysql/databases | |
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
## Remember to make the script executable, and unreadable by others |
var simplifyPath = function( points, tolerance ) { | |
// helper classes | |
var Vector = function( x, y ) { | |
this.x = x; | |
this.y = y; | |
}; | |
var Line = function( p1, p2 ) { | |
this.p1 = p1; |