Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.siri.org.uk/siri" version="1.0"
xmlns:ojp="http://www.vdv.de/ojp" xsi:schemaLocation="http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd">
<OJPRequest>
<ServiceRequest>
<RequestTimestamp>2022-11-30T10:00:00.000Z</RequestTimestamp>
<RequestorRef>IRMA</RequestorRef>
<ojp:OJPLocationInformationRequest>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ffmpeg -i src.MP4 -ss 00:08:10 -to 00:08:55 -async 1 -c copy dst.mp4
ffmpeg -i dst.mp4 -filter:v "crop=1000:900:900:60" dst-crop.mp4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vasile
vasile / swiss_stops_ordered_by_frequency.txt
Last active October 31, 2016 22:06
🇨🇭Swiss public transport stops sorted in terms of frequency
🇨🇭Swiss public transport stops sorted in terms of frequency
The number of departures were counted for Monday, 31.10.2016
The frequency per hour corresponds with the time interval 08:00 - 08:59
GeoJSON version: https://github.com/vasile/swiss-transit-stops/blob/master/map/stops_frequency.geojson
DataSources:
- stops: https://github.com/vasile/swiss-transit-stops
- departures: http://www.fahrplanfelder.ch/
@vasile
vasile / infofer.rb
Created October 5, 2015 20:58
data.gov.ro infofer parser
require 'nokogiri'
require 'sqlite3'
require 'FileUtils'
def seconds_to_hhmm (total_seconds)
# From http://stackoverflow.com/a/9916691
seconds = total_seconds % 60
minutes = (total_seconds / 60) % 60
hours = total_seconds / (60 * 60)
@vasile
vasile / resize_video.sh
Created April 28, 2016 19:49
Use FFmpeg to resize videos
# tested on OSX
# get FFmpeg: brew install ffmpeg
#
# resize source movie (-i parameter) to max width 640px and 128k MP3 audio
# for crf (constant rate factor) see https://trac.ffmpeg.org/wiki/Encode/H.264
#
ffmpeg -i /path/to/source.mp4 \
-vcodec libx264 \
-y -codec:a mp3 -strict -2 -b:a 128k -ar 44100 \
-crf 23 \
@vasile
vasile / beautify_json.rb
Created December 30, 2015 08:33
Beautify JSONs
require 'json'
if ARGV[0].nil?
print "USAGE: json_beauty.rb /path/tofile.json\n"
exit
end
json_path = ARGV[0]
json = JSON.parse(File.open(json_path, "r").read)
@vasile
vasile / gist:7575541
Created November 21, 2013 03:14
TPG - GeoJSON polylines used by http://maps.vasile.ch/tpg/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.