Skip to content

Instantly share code, notes, and snippets.

View collei's full-sized avatar
💭
I may be slow to respond.

Collei Inc. collei

💭
I may be slow to respond.
View GitHub Profile
@collei
collei / filtrni.js
Last active March 10, 2026 23:38
Simple way to limit number impout to certain formats
/**
* FILTRNI
*
* Applies input restrictions on input elements.
* Add 'filtrni-input' CSS class and a 'filtrni-type' attribute to the input.
* Supported types:
* tinyint, smallint, int, bigint, decimal(n,p), numeric(n,p), real, float, double
* Use 'unsigned' before name type to prevent signal (+ and -)
*
* @author github.com/collei <alarido.su@gmail.com>
@jas-
jas- / class.stream.php
Last active January 8, 2026 16:54
PHP stream handler w/ support for multiple files over PUT
<?php
/**
* stream - Handle raw input stream
*
* LICENSE: This source file is subject to version 3.01 of the GPL license
* that is available through the world-wide-web at the following URI:
* http://www.gnu.org/licenses/gpl.html. If you did not receive a copy of
* the GPL License and are unable to obtain it through the web, please
*
@umidjons
umidjons / files-array-normalize.md
Created March 31, 2014 14:35
Normalize $_FILES array when uploading multiple files (from php.net)

Normalize $_FILES array when uploading multiple files

When uploading multiple files, the $_FILES variable is created in the form:

Array
(
    [name] => Array
        (
            [0] => foo.txt