Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
err=false
tmp=$(mktemp) && {
varnishd -C -f /etc/varnish/default.vcl 2>$tmp \
|| {
r=$?
err=true
@cantoute
cantoute / webp-on-demand.php
Last active January 26, 2021 22:10
Real simple Webp on demand based on cwebp
<?php
/******************
* .htaccess exemple
******************
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect to existing converted image in cache-dir (if browser supports webp)
@cantoute
cantoute / wordpress_export_to_json.php
Created May 12, 2020 02:28 — forked from jsnelders/wordpress_export_to_json.php
Export all core WordPress data (posts, pages, attachments, comments, tags, categories and users) to a JSON formatted file.
<?php
/**
* Plugin Name: WordPress Export to JSON
* Plugin URI: https://jsnelders.com/
* Description: Export all WordPress posts, pages, comments, tags, commments and users to a JSON file.
* Author: Jason Snelders
* Author URI: http://jsnelders.com
* Version: 2020-01-30.1
**/