Skip to content

Instantly share code, notes, and snippets.

@Rahe
Rahe / gist:d59c9b4da6f8594658cc
Created November 13, 2014 22:02
Forcer la regénération des images d'un média
<?php
/*
Parfois lors de la modification de l'image source d'un article à travers le wp_image_editor,
on veut que WordPress regénère les thumbnails associées, voici le moyen de le faire le plus simplement
*/
/**
* Rebuilt the image sizes
*
* @param $att_id
@chriseppstein
chriseppstein / _minified_filenaming.md
Last active November 26, 2019 07:40
compiling a minified version of css. This configures your compass project to emit files in minified form when compiling for production.
$ compass compile --environment production && compass compile

Afterwards you will have both the minified and non-minified versions in your output folder. Note that compass clean will not clean up your minified files.

@xeoncross
xeoncross / benchmark.php
Created November 18, 2011 20:06
Simple PHP benchmark class
<?php
define('SYSTEM_START_TIME', microtime(TRUE));
define('SYSTEM_START_MEMORY', memory_get_usage());
register_shutdown_function('_usage');
function _usage()
{
if(PHP_SAPI !== 'cli')