Skip to content

Instantly share code, notes, and snippets.

View hadjiprocopis's full-sized avatar

Andreas Hadjiprocopis hadjiprocopis

View GitHub Profile
@hadjiprocopis
hadjiprocopis / otp-devel-localise-index.pl
Last active September 13, 2024 08:19
Perl script to localise OpenTripPlanner's provided html clients so that they operate without network access by detecting and fetching all external javascript/css dependencies. This works OK for the GraphQL explorer (e.g. http://localhost:8080/graphiql) but the query interface (e.g. http://localhost:8080) still needs the network to fetch OpenStre…
#!/usr/bin/env perl
##############################################################################
#
# By: Andreas Hadjiprocopis (c) 2024 [ andreashad2 at gmail dot com ]
# Date: 13-Sep-2024
# Free to modify and/or distribute with attribution
#
# Script to localise OpenTripPlanner's client user-interface
# so that it can operate without network access.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
/* delete keys matching a pattern, comments welcome
author: Andreas Hadjiprocopis (https://github.com/hadjiprocopis) / bliako
date : 30/11/2021
*/
/* cvector is a headers-only vector implementation