Skip to content

Instantly share code, notes, and snippets.

@marcelrv
marcelrv / _docker-migrate-aufs.md
Last active Oct 5, 2021
Docker migrate to overlay2 from aufs script
View _docker-migrate-aufs.md

Docker migrate to overlay2 from aufs script

Crazy that this is pretty much forced change without proper transition script

note. Based on https://www.sylvaincoudeville.fr/2019/12/docker-migrer-le-stockage-aufs-vers-overlay2/ NOT WORKING!!!! IF FOLLOWING THE ABOVE.. SOMEHOW THE CONTAINERS DO NOT RE-APPEAR!

The only way I found that is somewhat automated is the the docker-compose way..

Which is still not 100% and require manual fixing of stupid errors of the docker-compose tool (mainly things that ere not interpreted right, like dates & userIds that need to manually surrounded by quotes etc)

@marcelrv
marcelrv / dept-upload.md
Last active May 20, 2021
Openseamap dept upload
View dept-upload.md

get the list of vessel configs http://depth.openseamap.org:8080/org.osm.depth.upload/api2/vesselconfig

get list of tracks http://depth.openseamap.org:8080/org.osm.depth.upload/api2/track Response:

[{"id":125628,"fileName":"skserver-raw_2021-05-13T12-clean.txt","upload_state":6,"fileType":"application/x-nmea0183","compression":"application/zip","vesselconfigid":0,"containertrack":125625,"license":0,"uploadDate":0,"num_points":3140,"left":5.394117,"right":5.4788833,"top":53.181168,"bottom":53.170315},{"id":125625,"fileName":"skserver-raw_2021-05-13T12-clean.zip","upload_state":6,"compression":"application/zip","vesselconfigid":1377,"containertrack":0,"license":1,"uploadDate":1621376695330,"num_points":3140,"left":5.394117,"right":5.4788833,"top":53.181168,"bottom":53.170315},{"id":125622,"fileName":"nmeatest.txt","upload_state":3,"fileType":"application/x-nmea0183","compression":"application/zip","vesselconfigid":0,"containertrack":125619,"license":0,"uploadDate":0,"num_points":0,"left":0.0,"right":0.0,"t
@marcelrv
marcelrv / Onkyo_mount_Image.md
Last active Nov 21, 2021
Onkyo Firmware analysis / hacking
View Onkyo_mount_Image.md
@marcelrv
marcelrv / SeaChartCreator.md
Last active Dec 10, 2020
Installing and creating mbtiles with SeaChartCreator
View SeaChartCreator.md

SeaChartCreator

git clone https://github.com/stevo01/SeaChartCreator.git
git clone https://github.com/stevo01/imgkap.git
@marcelrv
marcelrv / gist:013d721b303a60fcb4456ae20c72265c
Created Dec 3, 2020
VNC with default desktop on Ubuntu 20.04
View gist:013d721b303a60fcb4456ae20c72265c
https://www.teknotut.com/en/install-vnc-server-with-gnome-display-on-ubuntu-18-04/#Install_Gnome
Key:
nano ~/.vnc/xstartup
Then fill in the following code.
#!/bin/sh
@marcelrv
marcelrv / gist:6e3300cd5ac85af66ef2152d60539411
Last active Jul 19, 2021
miio powerstrip power settings
View gist:6e3300cd5ac85af66ef2152d60539411
data: {"id":3552,"method":"set_lowpower_autooff","params":[{"lp_autooff":1,"lp_autooff_delay":5,"lp_threshold":2}]}
gateway
data: {"id":7765,"method":"get_device_prop_exp","params":[["lumi.158d0001e09bd","temperature","humidity","pressure"]]}
lamp uit
data: {"id":7482,"method":"set_rgb","params":[0]}
data: {"id":7481,"method":"get_prop","params":["rgb"]}
View dev links
@marcelrv
marcelrv / python-miio.md
Last active Mar 31, 2020
Docker to run python-miio
View python-miio.md

nano Dockerfile add the following to it:

FROM python:3.8
#FROM python:3.7-alpine
RUN apt-get install  libffi-dev libssl-dev
#RUN apt add --no-cache  libffi-dev libssl-dev
RUN pip3 install python-miio
View gist:20509106e97b4c7dd8c9056aefda2332
http://miot-spec.org/miot-spec-v2/instances?status=all
http://miot-spec.org/miot-spec-v2/instances?status=debug
http://miot-spec.org/miot-spec-v2/instances?status=released
and for example air purifier 3 cn (zhimi.airpurifier.ma4)
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-ma4:1
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:philips-bulb:1
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:zhimi-sa1:1
View TSD build error.txt
marcel@docker-server:~/TheSpaghettiDetective$ docker-compose --verbose up --build -d
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.utils.config.find_config_file: Trying paths: ['/home/marcel/.docker/config.json', '/home/marcel/.dockercfg']
docker.utils.config.find_config_file: Found file at path: /home/marcel/.docker/config.json
docker.auth.load_config: Couldn't find auth-related section ; attempting to interpret as auth-only file
docker.auth.parse_auth: Auth data for auths is absent. Client might be using a credentials store instead.
docker.auth.parse_auth: Auth data for HttpHeaders is absent. Client might be using a credentials store instead.
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.35/version HTTP/1.1" 200 535
compose.cli.command.get_client: docker-compose version 1.24.1, build 4667896b
docker-py version: 3.7.3