Skip to content

Instantly share code, notes, and snippets.

View DLzer's full-sized avatar
🛠️
Fixing stuff

DLzer DLzer

🛠️
Fixing stuff
View GitHub Profile
@DLzer
DLzer / huma-example.go
Last active February 26, 2025 16:55
Huma example with Chi router and group/sub-group middleware
package main
import (
"context"
"fmt"
"net/http"
"github.com/danielgtaylor/huma/v2"
"github.com/danielgtaylor/huma/v2/adapters/humachi"
"github.com/go-chi/chi/v5"
@DLzer
DLzer / prev-iteration.php
Last active April 29, 2020 16:48
PHP ArrayIteration Previous
<?php
$array = array('1' => 'one',
'2' => 'two',
'3' => 'three');
$arrayobject = new ArrayObject($array);
for($iterator = $arrayobject->getIterator();
$iterator->valid();