Skip to content

Instantly share code, notes, and snippets.

@pqina
pqina / create-thumbnail.php
Last active June 29, 2023 18:13
Create thumbnails with PHP
<?
// Link image type to correct image loader and saver
// - makes it easier to add additional types later on
// - makes the function easier to read
const IMAGE_HANDLERS = [
IMAGETYPE_JPEG => [
'load' => 'imagecreatefromjpeg',
'save' => 'imagejpeg',
'quality' => 100
@pqina
pqina / wip.js
Created February 1, 2023 12:42
Hotlist Plugins
/**
* getId
* @returns { string } Between 3 and 8 lowercase characters
*/
const getId = () => 'wip';
/**
* getName
* @returns { string } Between 3 and 32 characters
*/