Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Wulveryck owulveryck

View GitHub Profile
@owulveryck
owulveryck / main.go
Created Apr 22, 2021
Reading the .line format from the reMarkable
View main.go
package main
import (
"encoding/binary"
"errors"
"fmt"
"image"
"io"
"log"
"os"
@owulveryck
owulveryck / script.sh
Created Apr 6, 2021
screenshot on remarkable
View script.sh
#!/bin/sh
(
cat << \EOF
dd if=/proc/$(pidof xochitl)/mem count=2628288 bs=1 skip=$((16#$(grep '/dev/fb0' /proc/$(pidof xochitl)/maps | sed 's/.*\-\([0-9a-f]*\) .*/\1/')))
EOF
) | ssh root@IP_OF_REMARKABLE | convert -depth 8 -size 1872x1404+0 gray:- shot.png
@owulveryck
owulveryck / plantuml.yml
Created Mar 30, 2021
GitHub action to generate plantuml files
View plantuml.yml
name: Generate PlantUML Diagrams
on:
push:
branches:
- main
jobs:
plantuml:
runs-on: ubuntu-latest
env:
UML_FILES: ".puml"
@owulveryck
owulveryck / AAA README.md
Last active Feb 13, 2022
Generateur de QR Code tous anti covid
View AAA README.md

go run . &gt; output.png

@owulveryck
owulveryck / canvas.svg
Last active Mar 15, 2021
Wardley MAp canvas in SVG + Go
View canvas.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View go-tool-objdump.s
00000000000a37e0 <main.main>:
a37e0: f9400b81 ldr x1, [x28, #16]
a37e4: 910003e2 mov x2, sp
a37e8: eb01005f cmp x2, x1
a37ec: 54000649 b.ls a38b4 <main.main+0xd4> // b.plast
a37f0: f81c0ffe str x30, [sp, #-64]!
a37f4: f81f83fd stur x29, [sp, #-8]
a37f8: d10023fd sub x29, sp, #0x8
a37fc: f000027b adrp x27, f2000 <runtime.gcbits.*+0xef8>
a3800: 9132237b add x27, x27, #0xc88
@owulveryck
owulveryck / client.go
Created Dec 20, 2020
Live picture mjpeg remarkable
View client.go
package main
import (
"bytes"
"compress/zlib"
"context"
"encoding/gob"
"image"
"image/jpeg"
"log"
@owulveryck
owulveryck / monotonic.go
Created Dec 12, 2020
Detect if the os has been in sleep mode by looking at the clock
View monotonic.go
func hasSlept(ctx context.Context, healthCheck time.Duration, sleptTime time.Duration) <-chan struct{} {
signalC := make(chan struct{})
go func(chan<- struct{}) {
tick := time.NewTicker(healthCheck)
last := time.Now()
for {
select {
case <-ctx.Done():
return
case <-tick.C:
@owulveryck
owulveryck / AAAReadme.md
Last active Nov 6, 2020
Turtle ref parsing
View AAAReadme.md

This is a quick'n'dirty code to test the turtle parsing of schema.org and the graph generation

Usage:

curl  https://schema.org/version/latest/schemaorg-current-http.ttl | go run .