Skip to content

Instantly share code, notes, and snippets.

View the-commits's full-sized avatar
🤣
I may be slow to respond, busy laughing.

Magnus Åberg the-commits

🤣
I may be slow to respond, busy laughing.
View GitHub Profile
@the-commits
the-commits / sail-composer-install.sh
Last active June 23, 2024 11:30 — forked from njbair/bootstrap-sail.sh
Install via sail without php on host
#!/bin/sh
docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/var/www/html -w /var/www/html laravelsail/php82-composer:latest composer install --ignore-platform-reqs
{
"title": "JSON schema for WordPress blocks",
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"//": {
"reference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/",
"attributesReference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/",
"contextReference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/",
"supportsReference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/",
"registerReference": "https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/#example-optional"
@the-commits
the-commits / launch_vm.sh
Created August 7, 2022 05:49 — forked from joedborg/launch_vm.sh
LXD Ubuntu VM launch and disk resize
#!/bin/env bash
set -e
readonly VM="banana"
readonly CPU="8"
readonly MEM="8GB"
readonly DSK="120GB"
lxc init images:ubuntu/focal ${VM} -p default -p vm --vm
@the-commits
the-commits / vcl-regex-cheat-sheet
Created February 15, 2019 12:28 — forked from dimsemenov/vcl-regex-cheat-sheet
Regular expression cheat sheet for Varnish (.vcl). Examples of vcl regexp. Found here http://kly.no/varnish/regex.txt (by Kristian Lyngstøl)
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
req.url ~ "searchterm"
True if req.url contains "searchterm" anywhere.
req.url == "searchterm"
@the-commits
the-commits / install_nginx_mainline-1.11.3.sh
Last active December 8, 2017 12:38
A script I use to install LEMP on my vagrant (ubuntu/xenial64) from scratch including installations of package
#!/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y build-essential libpcre3 libpcre3-dev libssl-dev
wget -q http://nginx.org/download/nginx-1.11.3.tar.gz
tar -zxvf nginx-1.11.3.tar.gz
rm nginx-1.11.3.tar.gz