Skip to content

Instantly share code, notes, and snippets.

View PierreThiollent's full-sized avatar
🚀

Pierre Thiollent PierreThiollent

🚀
View GitHub Profile
@apisklov
apisklov / functions.php
Created December 30, 2020 12:41 — forked from ChrisButterworth/functions.php
Webp converter for WordPress
<?php
// Only dependency that's used
// TODO: Implement filter for the_content();
use WebPConvert\WebPConvert;
add_filter('wp_generate_attachment_metadata', function($meta) {
$path = wp_upload_dir(); // get upload directory
@ChrisButterworth
ChrisButterworth / converter.php
Created September 5, 2018 12:26
Webp converter for WordPress
<?php
namespace Converter;
use WebPConvert\WebPConvert;
class Converter
{
public $lazy = false;
public function __construct($lazy = false)
@boye
boye / create_mamp_vhost.sh
Created September 5, 2013 14:04
Small Bash script to create a MAMP vhost
#!/bin/bash
RED="\033[0;31m"
YELLOW="\033[33m"
REDBG="\033[0;41m"
WHITE="\033[1;37m"
NC="\033[0m"
if [ "$1" = "create" ] || [ "$1" = "add" ]; then
# Ask for document root