Skip to content

Instantly share code, notes, and snippets.

View rafal-kos's full-sized avatar
🏠
Working from home

Kos Rafał rafal-kos

🏠
Working from home
View GitHub Profile
@rafal-kos
rafal-kos / github-pr-27860-datepicker.diff
Created July 8, 2020 09:13
Don't load datepicker module until it is actually needed https://github.com/magento/magento2/pull/27860
From 4c21e460d180de2d76810cddd6a53d256113656c Mon Sep 17 00:00:00 2001
From: Mateusz Krzeszowiak <mateusz.krzeszowiak@creativestyle.pl>
Date: Fri, 10 Apr 2020 19:41:08 +0200
Subject: [PATCH 1/3] Don't load datepicker module until it is actually needed
---
.../view/frontend/templates/js/calendar.phtml | 3 +-
.../js/lib/knockout/bindings/datepicker.js | 57 ++++++++++---------
2 files changed, 32 insertions(+), 28 deletions(-)
@rafal-kos
rafal-kos / github-pr-28400-color-picker.diff
Last active July 8, 2020 09:16
Load color picker dependencies only when it is actually used https://github.com/magento/magento2/pull/28400
From f792d30280bfcbc34779bb1977760008e439b33e Mon Sep 17 00:00:00 2001
From: Mateusz Krzeszowiak <mateusz.krzeszowiak@creativestyle.pl>
Date: Thu, 28 May 2020 08:46:04 +0200
Subject: [PATCH 1/6] Load color picker dependencies only when it is actually
used
---
.../js/lib/knockout/bindings/color-picker.js | 28 +++---
.../base/js/lib/ko/bind/color-picker.test.js | 97 ++++++++++---------
2 files changed, 64 insertions(+), 61 deletions(-)
@rafal-kos
rafal-kos / slugify.php
Created December 21, 2011 07:09
Slugify PHP version
function slugify($phrase) {
$a = array('A', 'Á', 'Â', 'A', 'Ä', 'A', 'A', 'Ç', 'E', 'É', 'E', 'Ë', 'I', 'Í', 'Î', 'I', '?', 'N', 'O', 'Ó', 'Ô', 'O', 'Ö', 'O', 'U', 'Ú', 'U', 'Ü', 'Ý', 'ß', 'a', 'á', 'â', 'a', 'ä', 'a', 'a', 'ç', 'e', 'é', 'e', 'ë', 'i', 'í', 'î', 'i', 'n', 'o', 'ó', 'ô', 'o', 'ö', 'o', 'u', 'ú', 'u', 'ü', 'ý', 'y', 'A', 'a', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'C', 'c', 'C', 'c', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'E', 'e', 'E', 'e', 'E', 'e', 'Ę', 'ę', 'Ě', 'ě', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', '?', '?', 'J', 'j', 'K', 'k', 'Ĺ', 'ĺ', 'L', 'l', 'Ľ', 'ľ', '?', '?', 'Ł', 'ł', 'Ń', 'ń', 'N', 'n', 'Ň', 'ň', '?', 'O', 'o', 'O', 'o', 'Ő', 'ő', 'O', 'o', 'Ŕ', 'ŕ', 'R', 'r', 'Ř', 'ř', 'Ś', 'ś', 'S', 's', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'Ů', 'ů', 'Ű', 'ű', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', '?', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', '