Skip to content

Instantly share code, notes, and snippets.

View zbycz's full-sized avatar

Pavel Zbytovský zbycz

View GitHub Profile
import fs from 'fs'
// [out:json][timeout:25];
// nwr["climbing"="route_bottom"];
// out geom;
const filename = '/Users/pavel/Library/Application Support/JetBrains/WebStorm2024.3/scratches/scratch_84.json'
const content = fs.readFileSync(filename, 'utf8');
const json = JSON.parse(content);
@zbycz
zbycz / .eslintrc.json
Created May 21, 2025 08:53
Eslint rule for checking if @emotion/styled filters out transient props.
{
"plugins": ["eslint-plugin-local-rules"],
"extends": ["plugin:local-rules/all"],
}
@zbycz
zbycz / cliffsLayers.ts
Last active May 9, 2025 14:07
For addition to Maptiler Outdoor style
import type { LayerSpecification } from '@maplibre/maplibre-gl-style-spec';
export const cliffsLayers: LayerSpecification[] = [
{
id: 'Cliffs base',
type: 'line',
source: 'maptiler_planet',
layout: {
'line-cap': 'butt',
'line-join': 'miter',
@zbycz
zbycz / mediawiki.ts
Created August 21, 2024 12:30
Mediawiki API client with file upload (TypeScript)
import fetch from 'isomorphic-unfetch';
import {
FORMAT,
getUploadBody,
cookieJar,
UploadParams,
WIKI_URL,
} from './utils';
import { readFile } from 'node:fs/promises';
2023-01-16 14:54:24,473 | prepare_gtfs | DEBUG | prepare_gtfs.py:85 | main | Stop Baterie,50.092346 14.369761 with ID U15Z51P not found in OSM
2023-01-16 14:54:24,475 | prepare_gtfs | DEBUG | prepare_gtfs.py:85 | main | Stop Baterie,50.092644 14.370036 with ID U15Z52P not found in OSM
2023-01-16 14:54:24,567 | prepare_gtfs | DEBUG | prepare_gtfs.py:98 | main | Found more stops with id U32Z1P,50.090168 14.435472
2023-01-16 14:54:24,568 | prepare_gtfs | DEBUG | prepare_gtfs.py:98 | main | Found more stops with id U32Z2P,50.090351 14.436262
2023-01-16 14:54:24,650 | prepare_gtfs | DEBUG | prepare_gtfs.py:85 | main | Stop Budějovická,50.044762 14.447591 with ID U50Z1 not found in OSM
2023-01-16 14:54:24,667 | prepare_gtfs | DEBUG | prepare_gtfs.py:85 | main | Stop Poliklinika Budějovická,50.044777 14.449234 with ID U50Z17P not found in OSM
2023-01-16 14:54:24,668 | pr
This file has been truncated, but you can view the full file.
{
"aerodrome_label": {
"extent": 4096,
"features": [
{
"geometry": {
"coordinates": [
862,
2832
],

Keybase proof

I hereby claim:

  • I am zbycz on github.
  • I am zbycz (https://keybase.io/zbycz) on keybase.
  • I have a public key ASBWYtBmAZ_HruUcWDXaj7Hq7W5Vm1b48Ixfiho5qLqfowo

To claim this, I am signing this object:

@zbycz
zbycz / facebook-messages-to-csv.php
Created June 23, 2018 09:57
Transforms all Facebook Messanger to CSV meta file for further analysis
<?php
// Open https://www.facebook.com/your_information/ and click "Download"
// then select JSON format (and optionaly low quality media) and hit "Create file"
$zip = zip_open("facebook-messages.zip");
$fw = fopen("messages.csv", "w");
if (is_resource($zip)) {
while ($zip_entry = zip_read($zip)) {
#!/usr/bin/env bash
USERNAME='xxx' PASSWORD='xxx' yarn examples-server
@zbycz
zbycz / web-incoming.js
Created April 27, 2018 19:00
http-proxy with ssl dump
var httpNative = require('http'),
httpsNative = require('https'),
web_o = require('./web-outgoing'),
common = require('../common'),
followRedirects = require('follow-redirects');
web_o = Object.keys(web_o).map(function(pass) {
return web_o[pass];
});