Skip to content

Instantly share code, notes, and snippets.

View bnomei's full-sized avatar
💬

Bruno Meilick bnomei

💬
View GitHub Profile
@lukaskleinschmidt
lukaskleinschmidt / README.md
Last active October 31, 2023 10:08
Kirby CLI Commands

Warning Make sure you have the old and new blueprint available when running this command.
Otherwise this command will wipe the currently stored content.
Always make sure to test the command first and have a backup of your content!

function release() {
composer_json="composer.json"
if [[ ! -f "$composer_json" ]]; then
echo "❌ ️Error: composer.json file not found."
return 1
fi
echo "✅ ️Increment composer version"
@adamkiss
adamkiss / Retour Query Optimization.md
Last active March 18, 2020 14:59
Retour Overview Query Optimization

SQL Optimization — Retour database, events overview

@distantnative asked me (well, anyone) to optimize a SQL query which generates an overview of Retour events.

#Programming/SQL

Original Query

with recursive dates as (
    select "2019-10-01" as date
 union all
@bedeabza
bedeabza / hexhsl.php
Created April 11, 2014 12:10
PHP Hex to HSL and HSL to Hex conversion
function hexToHsl($hex) {
$hex = array($hex[0].$hex[1], $hex[2].$hex[3], $hex[4].$hex[5]);
$rgb = array_map(function($part) {
return hexdec($part) / 255;
}, $hex);
$max = max($rgb);
$min = min($rgb);
$l = ($max + $min) / 2;