Skip to content

Instantly share code, notes, and snippets.

View hranicka's full-sized avatar

Jaroslav Hranička hranicka

View GitHub Profile
hranicka / project.docker-compose.yml
Created November 28, 2019 12:29
Traefik & multiple docker-compose projects
version: '3'
- "traefik.enable=true"
- "traefik.http.routers.provys-transformer.rule=Host(``)"
- "traefik.http.routers.provys-transformer.tls=true"
- traefik
hranicka /
Last active November 27, 2019 10:16
OpenLDAP Installation

Configure firewall

apt-get install ufw
ufw allow ssh
ufw allow http
ufw allow https
ufw allow ldap
ufw allow ldaps
ufw enable
hranicka / http-basic-auth.php
Created September 18, 2017 09:36
HTTP Basic Auth header generator
$user = '';
$pass = '';
$header = sprintf('Authorization: Basic %s', base64_encode(sprintf('%s:%s', $user, $pass)));
echo $header . "/n";
hranicka / AvailabilityResolver.php
Created February 22, 2017 17:15
AvailabilityResolver - Can you find a bug w/o tests?
class AvailabilityResolver
/** @var \DateTimeInterface */
private $dateTime;
public function __construct(\DateTimeInterface $dateTime = NULL)
hranicka / ob.php
Last active May 5, 2023 14:52
PHP flush() under Apache, mod_proxy, php-fpm
function doFlush()
if (!headers_sent()) {
// Disable gzip in PHP.
ini_set('zlib.output_compression', 0);
// Force disable compression in a header.
// Required for flush in some cases (Apache + mod_proxy, nginx, php-fpm).

Keybase proof

I hereby claim:

  • I am hranicka on github.
  • I am hranicka ( on keybase.
  • I have a public key ASA7S3DC1yp48XOLziNDo0U8PgSfE6yJrj56Z_SeaElmxQo

To claim this, I am signing this object:

hranicka /
Last active October 5, 2022 01:00
Download all activities from (as .gpx)

Export all your Runtastic data at once

Inspired by christianewald/ Thank you!

Major problem of the original solution above is that it opens "Save as" dialog for each file.

Yes, it can be by-passed if you set up a browser to automatically save the file (it's set up by default).

But I don't like it.