Skip to content

Instantly share code, notes, and snippets.

View r3dvorak's full-sized avatar

Richard Dvořák r3dvorak

View GitHub Profile
@r3dvorak
r3dvorak / uk-number.css
Created August 29, 2021 08:56 — forked from Septdir/uk-number.css
UIkit3 number
[input-number] input,
[input-number] input:focus,
[input-number] input:hover,
[input-number] input:active {
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
padding-right: 42px;
box-sizing: border-box;
}
@r3dvorak
r3dvorak / http_accept_language.php
Last active December 19, 2020 17:27 — forked from humantorch/http_accept_language.php
Compare supported languages with HTTP_ACCEPT_LANGUAGE in a users' browser.
<?php
// Languages we support
$available_languages = array("de", "en");
$default_language = "de"; // a default language to fall back to in case there's no match
function prefered_language($available_languages, $http_accept_language) {
global $default_language;
$available_languages = array_flip($available_languages);