Hidden hot spring behind Seljavallalaug in Iceland
Note: Moved here.
Note: Moved here.
I have migrated my blog from WordPress to hexo, but the old URLs need to be permanently redirected.
I'm using NGINX as my web server, so I set up some rules for redirecting the old posts to the new URLs. It's a bit tricky because WordPress used query string param for identifying the page, but it can be sorted out using if and the NGINX $arg_ variable. In order to generate these rules, I wrote a simple node script that runs through the exported Markdown files from WordPress. Markdown files were exported using Jekyll Exporter plugin.)
I had trouble finding a iCalendar parser that lets me get the actual events as shown in my google calendar. This means automatically handling EXDATE (excluded recursive occurrences), RRULE and recurring events overridden by RECURRENCE-ID. Also timezones need to be supported.
So I made a library that builds on ical.js.
UPDATE: Outdated - See new article
The VIPPS app is using API SSL certificate pinning to prevent MITM attacks, and the pinned certificate(s) is stored in the APK itself, so it can easily be replaced by our own generated Charles certificate. This allows sniffing the data going from the app to VIPPS servers.
Note: Moved here.
I needed a tool for quickly trimming recorded videos, so I built my first Electron app, check it out: https://mifi.github.io/lossless-cut/
Download links: https://github.com/mifi/lossless-cut/releases
It is a cross platform simple video editor for lossless trimming / cutting of videos using ffmpeg and Electron. Great for rough processing of large video files taken from a video camera, drone, etc. Lets you quickly get rid of the useless parts. It doesn't do any decoding / encoding and is therefore very fast and has no quality loss. Also allows for taking JPEG snapshots of the video at the selected time.
Quick script for extracting gps data from the Tracker GPS app
First export data from app com.eofster.tracker using something like iPhone Backup Extractor (http://supercrazyawesome.com/)
mkdir tracker-extract && cd tracker-extract
npm install csvtojson
npm install gps-to-gpx
(cd 'com.eofster.tracker/Library/Application Support/com.eofster.tracker' && sqlite3 -header -csv Tracker.sqlite "select * from ZTRACKPOINT order by ZTIMESTAMP;" > out.csv)
Create index.js:
var Converter = require("csvtojson").Converter;
var converter = new Converter({});
const createGpx = require('gps-to-gpx').default;
//end_parsed will be emitted once parsing finished
converter.on("end_parsed", function (jsonArray) {
//console.log(jsonArray);
const converted = jsonArray.map(pos => {
return {
latitude: pos.ZLATITUDE,
longitude: pos.ZLONGITUDE,
elevation: pos.ZALTITUDE,
time: new Date((pos.ZTIMESTAMP+978307200)*1000).toISOString()
};
});
const gpx = createGpx(converted, {
activityName: 'tur',
startTime: converted[0].time,
});
console.log(gpx);
});
//read from file
require("fs").createReadStream("out.csv").pipe(converter);
Run:
node . > out.gpx
On a mountain above Lærdal in Norway (Sogn og Fjordane), there is a neatly placed stone that you can climb on top of, which has an amazing view of the Sognefjord, which is the world's longest open (ice-free) fjord.
I created a Node.js CLI for exporting & importing schema and data from DynamoDB tables. I didn't find any other node tools for dumping table schema (structure, indexes etc), they all just dump data.
In case you had a hard time finding out how to reach the airline Norwegian by email/contact form, because I sure did. However they do have a contact page at a cryptic URL:
http://norwegian-no.custhelp.com/app/ask And their support email: norwegian.mailhq@norwegian.com