Skip to content

Instantly share code, notes, and snippets.

View zbycz's full-sized avatar

Pavel Zbytovský zbycz

View GitHub Profile
@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];
});
@zbycz
zbycz / github_gpg_key.md
Created April 17, 2018 08:56 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# Mac
<!doctype html>
<meta charset=utf-8>
<title></title>
<section itemscope itemtype="http://data-vocabulary.org/Person">
My name is <span itemprop="name">Jindřich Jiný</span> and I work as a <span itemprop="title">post-doc</span>
at the <span itemprop="affiliation">Moje organizace Coolname</span>.
<section itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address"> My office address is
<span itemprop="street-address">Technická 2</span>, <span itemprop="postal-code">16100<span>,
@zbycz
zbycz / TreeNode.php
Created March 4, 2014 23:24
Closure tree implementation
<?php
/**
* Class for smart browsing of recursive structures
*
* example:
* {var $node = $rootNode}
* <ul>
* {block #groups}