Skip to content

Instantly share code, notes, and snippets.

View Kcko's full-sized avatar
🦜
fly like a bird ...

Roman Janko Kcko

🦜
fly like a bird ...
View GitHub Profile
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>Textarea s @zmínkami a #tagy</title>
<style>
:root{
box-sizing:border-box;
padding-top:env(safe-area-inset-top,0px);
<?php
/**
* @param array $teams ID (nebo názvy) týmů
* @param int $cycles 1 = jednou, 2 = odvety, 4 = čtyřikrát...
* @param string $mode 'mirror' | 'shuffle'
* @return array<int, array<int, array{0:mixed,1:mixed}>>
* [kolo][pozice] = [domácí, hosté]; u volna [tým, null]
*/
function bergerSchedule(
array $teams,
_
@Kcko
Kcko / ambi.sql
Last active October 9, 2026 08:15
-- EXISTS
$selection->where('
(`dk_voucher`.`type` != ?
OR `dk_voucher`.`date_not_needed` = 1
OR EXISTS (
SELECT 1
FROM `dk_workshop_date` wd
WHERE wd.`dk_voucher_id` = `dk_voucher`.`id`
AND wd.`date_from` > NOW()
AND wd.`registration_deadline` > NOW()
@Kcko
Kcko / demo.txt
Last active October 7, 2026 12:52
https://jsbin.com/nazugiqaja
Info: půlka containeru = (počet sloupců / 2) × 100 %.
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bleed slider</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<!--
https://play.tailwindcss.com/vibc7NWlcK
-->
<div class="max-w-2xl mx-auto bg-red-400 py-10 mb-20">
<div class="bg-green-400 py-5 ml-[calc(50%-50vw)]">Bleed to left </div>
</div>
DROP PROCEDURE IF EXISTS moja_test_procedura;
DELIMITER //
CREATE PROCEDURE moja_test_procedura()
BEGIN
-- 1. Deklarace handleru MUSÍ být na začátku bloku BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
@Kcko
Kcko / app.css
Last active August 5, 2026 07:53
/* https://dyinglightgame.com/news/patch-notes */
.news-index__filter--active:before {
content: "";
position: absolute;
inset: 0;
-webkit-mask: url(/img/masks/mega.svg#button-border) no-repeat 0 0 / 151% 100%;
mask: url(/img/masks/mega.svg#button-border) no-repeat 0 0 / 151% 100%;
background: #d26370;
z-index: -1;