- Server Level Sustainability by Mighty Bytes
- SEO Keywords for Sustainability by Mighty Bytes
- How to set a Page Weight Budget by Wholegrain Digital
- Performant Web Fonts by Wholegrain Digital
- 17 Ways to make your website energy efficient by Wholegrain Digital
- Webwaste by Gerry McGovern
- Leaner Web notes by Rek
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
#!/bin/bash | |
# Go back to homebrew stable version of DDEV | |
set -x | |
set -o errexit | |
rm -f /usr/local/bin/ddev /opt/homebrew/bin/ddev || sudo rm -f /usr/local/bin/ddev /opt/homebrew/bin/ddev | |
if [ -d /opt/homebrew/bin ]; then | |
ln -sf /opt/homebrew/bin/ddev /usr/local/bin/ddev |
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
import Test from './Test.svelte'; | |
// Mount Svelte component | |
const test = new Test({ | |
target: document.querySelector('#test') | |
}); |
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
import: | |
- recipe/statamic.php | |
config: | |
application: 'statameet' | |
repository: '[email protected]:jonassiewertsen/my-project-i-want-to-deploy.git' | |
# keep_releases: 3 | |
shared_dirs: | |
# - public/img | |
# - .git |
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
<?php | |
register_activation_hook( __FILE__, 'setup_build_cron' ); | |
/** | |
* Setup a cron job to run daily. | |
* | |
* @return void | |
*/ | |
function setup_build_cron() { |
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
# | |
# This script is executed from a terminal prompt at the root of your MainWP WordPress website. | |
# It uses the same services as WP CLI, so if WP CLI runs, this should also. | |
# | |
# Execute MainWP CLI command to generate a list of all configured sites in MainWP | |
# Pipe output through filter to remove columns 3 and 4 of output. These columns hold the 2 digit site number. Adjust if more than 99 sites. | |
# Pipe that output to get rid of the comment lines in the site listing. | |
# Pipe that output through the SED editor inserting the security scan command at the beginning of the line | |
# Send everything to a shell script to be executed. | |
cd /var/www/capwebwpcare.com/htdocs |
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
const Purgecss = require('purgecss') | |
const { JSDOM } = require('jsdom') | |
const CleanCSS = require("clean-css"); | |
//array of css files to combine | |
const cssFiles = ['./src/css/custom.css','./src/css/markdown.css', './src/css/tachyons.css'] | |
// cleanCSSOptions for minification and inlining css, will fix duplicate media queries | |
const cleanCSSOptions = { | |
level: { |
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
<?php | |
namespace Deployer; | |
require 'recipe/common.php'; | |
// Project name | |
set('application', 'enovate.co.uk'); | |
// Project repository | |
set('repository', '[email protected]:enovatedesign/project.git'); |

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
<?php | |
function my_customize_rest_cors() { | |
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ); | |
add_filter( 'rest_pre_serve_request', function( $value ) { | |
header( 'Access-Control-Allow-Origin: *' ); | |
header( 'Access-Control-Allow-Methods: GET' ); | |
header( 'Access-Control-Allow-Credentials: true' ); | |
header( 'Access-Control-Expose-Headers: Link', false ); |
NewerOlder