This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Prevent non-async script</title> | |
<script> | |
(function(Document) { | |
const trueCreate = document.createElement.bind(document); | |
Document.prototype.createElement = function(tag, options) { | |
const script = trueCreate(tag, options); |
This file contains 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
# ZSH | |
autoload -U add-zsh-hook | |
# place default node version under $HOME/.node-version | |
load-nvmrc() { | |
DEFAULT_NODE_VERSION=`cat $HOME/.node-version` | |
if [[ -f .nvmrc && -r .nvmrc ]]; then | |
fnm use | |
elif [[ `node -v` != $DEFAULT_NODE_VERSION ]]; then | |
echo Reverting to node from "`node -v`" to "$DEFAULT_NODE_VERSION" |
This file contains 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 | |
class CacheBustingKirbyValetDriver extends KirbyValetDriver | |
{ | |
public function isStaticFile($sitePath, $siteName, $uri) | |
{ | |
$result = parent::isStaticFile($sitePath, $siteName, $uri); | |
if ($result !== false) { | |
return $result; | |
} | |
if (preg_match('/(.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif|svg|mp3|mp4|ogg)$/i', $uri, $matches)) { |