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
#!/usr/bin/env bash | |
# Usage: /path/to/build.sh target-environment-using-a-pipelines-variable | |
# Example: /path/to/build.sh production | |
# Expected behaviour; in production, build for production, for all else build uncompressed. | |
# For local (argo; NO environment given, or local specified) buld in debug mode. | |
### CONFIGURATION | |
NODE_VER=14 | |
BUILD_TASK_PROD=production | |
BUILD_TASK_LOCAL=dev |
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
{ | |
"global": { | |
"ask_for_confirmation_before_quitting": true, | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false, | |
"unsafe_ui": false | |
}, | |
"profiles": [ | |
{ |
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
# WordPress will serve a rich 404 page for missing images, in case of lots of images, this will put | |
# heavy load on the server and the 404 messages cannot be shown anyways | |
# So just send a light-weight Apache 404 message | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule \.(jpg|jpeg|png|gif|svg)$ - [R=404,NC,L] | |
# Alternative version; send a 410 Gone, which is even faster. |
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
# https://gist.github.com/rmpel/a54ffc349ecdba57c5dd7f33b81263dd | |
# | |
# This file is for unifying the coding style for different editors and IDEs | |
# Or at least; that is the plan. Currently FULLY supported IDEs are: | |
# - phpStorm | |
# | |
# Tried and failed; | |
# - VS Code (Supports .editorConfig, but does not support any extended rule-set) | |
# | |
# More information on the file format: |
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
RewriteEngine On | |
RewriteRule ^.well-known - [S=1] | |
RewriteRule ^ https://newdomain.com%{REQUEST_URI} [QSA,L,NC,R=307] | |
# use code 307 for "marketing" domains; redirects that will stay for quite a while. | |
# use code 308 in case the domain is deprecated and will be removed. |
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
[rules] => Array ( | |
[category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2] | |
[category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2] | |
[category/(.+?)/?$] => index.php?category_name=$matches[1] | |
[tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2] | |
[tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2] | |
[tag/([^/]+)/?$] => index.php?tag=$matches[1] | |
[type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2] |
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 | |
// Backfill missing uploads | |
// build your dev copy using plugins, theme and database | |
// don't download all uploads | |
// access an image on it, for example /wp-content/uploads/2021/10/some-image.png | |
// (of course, just loading a page with images on it will do) | |
// you will get 404s on all images | |
// place this file in mu-plugins folder | |
// try to access the url/page again |
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 | |
/** QUICK AND VERY DIRTY */ | |
header('Content-Type: text/plain'); header('Content-Disposition: attachment; filename=crawl.csv'); | |
?> | |
type,path,timestamp,date | |
<?php | |
___T(__DIR__); | |
function ___T($s) { | |
$l = array_merge( glob($s .'/.*'), glob($s .'/*') ); |
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
<IfModule mod_headers.c> | |
SetEnvIf Origin "http(s)?://(www\.)?((subdomain.)?yourdomain.nl)$" AccessControlAllowOrigin=$0 | |
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin | |
Header merge Vary Origin | |
</IfModule> |