Skip to content

Instantly share code, notes, and snippets.

View tuukka's full-sized avatar

Tuukka Hastrup tuukka

View GitHub Profile
@tuukka
tuukka / kalkati2gtfs.py
Last active December 15, 2015 13:39 — forked from stefanw/kalkati2gtfs.py
"""
Kalkati to GTFS converter
Beware: it simplifies some things.
(c) 2011 Stefan Wehrmeyer http://stefanwehrmeyer.com
License: MIT License
"""
from datetime import date, timedelta
@tuukka
tuukka / gist:6209464
Created August 12, 2013 09:29
draft of how local_config.coffee could work in the navigator
citynavi.update_configs
defaults:
...
helsinki:
...
overrides:
...
citynavi.set_config "helsinki"
# ~/.ssh/config
#
# convenient SSH/SCP settings for the SailfishOS SDK
# examples:
# ssh jolla
# ssh sailfish
# ssh root@sailfish
# ssh mersdk
# ssh root@mersdk
@tuukka
tuukka / gist:7a81112ef161ee77eccb
Created August 13, 2014 10:55
steps to create new btrfs filesystem for a Jolla phone
1. On a phone that's still working:
mount -o subvolid=0 /dev/mmcblk0p28 /mnt/
2. On a Linux laptop:
ssh jolla tar c /mnt/factory-@ >factory.tar
ssh jolla tar c /mnt/factory-@home >factory-home.tar
3. On the working phone again:
umount /mnt
@tuukka
tuukka / emfitqs.py
Created October 26, 2018 19:25 — forked from ejain/emfitqs.py
Retrieves sleep presence records from Emfit QS, and merges the records into a single spreadsheet.
import io, re, requests, sys, time, zipfile
def get_device(token):
r = get("/api/v1/user/get", token)
device = r.json()["user"]["devices"]
print("Device: " + device, file = sys.stderr)
return device
def list_presences(token, device):
r = get("/api/v1/presence/{0}/latest".format(device), token)