Skip to content

Instantly share code, notes, and snippets.

Avatar

Michal Kalita MichalKalita

View GitHub Profile
@MichalKalita
MichalKalita / README.md
Last active Sep 22, 2020
Write to Google Sheet with REST API
View README.md

Write data to Google Sheet with REST API

Setup

  1. Open your Google Sheet document
  2. Tools -> Script editor
  3. Copy the code, edit token value
  4. Save
@MichalKalita
MichalKalita / ceneoReportOrder.ts
Created Aug 28, 2020
Ceneo pl report order as a function, typescript
View ceneoReportOrder.ts
declare global {
interface Window {
ceneo_client_email: string;
ceneo_order_id: string;
ceneo_shop_product_ids: string;
}
}
/**
* API documented on url https://www.ceneo.pl/poradniki/Podrecznik-integracji-ZO-platformy
@MichalKalita
MichalKalita / validation.js
Created Aug 25, 2020
YUP locale czech cs_CZ
View validation.js
import { setLocale } from "yup";
setLocale({
mixed: {
default: 'Hodnota v "${path}" je neplatná',
required: 'Pole "${path}" je povinné',
oneOf: "${path} musí obsahovat jednu z následujících hodnot: ${values}",
notOneOf:
"${path} nesmí obsahovat žádnou z následujících hodnot: ${values}",
},
@MichalKalita
MichalKalita / SearchFilter.tsx
Created Aug 14, 2020
Ability to ILIKE find for ra-data-hasura
View SearchFilter.tsx
/*
This is almost copy of ra-ui-materialui/src/list/Filter.tsx
Filters in array of props.searchSources are changed to ILIKE %value%
*/
import * as React from "react";
import { FC, ReactNode } from "react";
import { makeStyles } from "@material-ui/core/styles";
import { sanitizeListRestProps, useListContext } from "ra-core";
@MichalKalita
MichalKalita / czech.js
Created Apr 17, 2020
React admin czech i18n translate
View czech.js
export default {
ra: {
action: {
delete: "Smazat",
show: "Ukázat",
list: "Seznam",
save: "Uložit",
create: "Vytvořit",
edit: "Upravit",
export: "Exportovat",
@MichalKalita
MichalKalita / links.txt
Created Jul 24, 2018
Web pages using Nette framework
View links.txt
@MichalKalita
MichalKalita / docker-compose.yml
Created Jul 19, 2018
Traefik docker basic configuration
View docker-compose.yml
version: '2'
services:
traefik:
image: traefik:latest
restart: always
ports:
- 80:80
- 443:443
@MichalKalita
MichalKalita / kraje a mesta CR.csv
Last active Feb 3, 2017
Kraje a města České Republiky, neobsahuje obce
View kraje a mesta CR.csv
id parent_id name
1 Hlavní město Praha
2 Jihočeský
3 Jihomoravský
4 Karlovarský
5 Královéhradecký
6 Liberecký
7 Moravskoslezský
8 Olomoucký
9 Pardubický
@MichalKalita
MichalKalita / paginator.latte
Created Jun 24, 2015
Vykreslení objektu Nette\Utils\Paginator, použití {include ../paginator.latte, paginator => $paginator}, kde $paginator máme předán z presenteru
View paginator.latte
{** Bootstrapové vykreslení paginatoru *}
{default $maxOdkazu = 15}
{default $postupnychStranek = 4}
{var $min = $paginator->getBase()}
{var $max = $paginator->getPageCount()}
{var $pocet = ($max - $min)}
{var $aktStrana = $paginator->getPage()}
{var $doplnkovychStran = $maxOdkazu - 2 - ($postupnychStranek*2) + 1}
@MichalKalita
MichalKalita / Soupis webů s Nette Framework
Last active Nov 4, 2018
Update 29.4.2016: zkontrolováno cca 200 000 stránek, podle hlavičky "X-Powered-By"
View Soupis webů s Nette Framework
http://www.100reklam.cz
http://10hvezd.cz
http://12plus12.cz
http://www.17november1989.sk
http://1bazar.sk
http://www.1cfc.cz
http://1cornhill.com
http://1site.cz
http://www.1weby.cz
http://24keys.cz
You can’t perform that action at this time.