Skip to content

Instantly share code, notes, and snippets.

View owulveryck's full-sized avatar

Olivier Wulveryck owulveryck

View GitHub Profile
@owulveryck
owulveryck / dev.sh
Created May 17, 2021 11:55
shell wrapper to trigger my dev tools
#!/bin/zsh
if [ ! "$TMUX" ]; then
tmux new-session $0 $@
exit
fi
tmux new-window -n "vim $@"
LASTWINDOW=$(tmux list-windows | sort -k 8 | tail -1 | sed 's/\([0-9]*\):.*/\1/')
@owulveryck
owulveryck / main.go
Created April 22, 2021 07:18
Reading the .line format from the reMarkable
package main
import (
"encoding/binary"
"errors"
"fmt"
"image"
"io"
"log"
"os"
@owulveryck
owulveryck / script.sh
Created April 6, 2021 13:41
screenshot on remarkable
#!/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 March 30, 2021 13:01
GitHub action to generate plantuml files
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 February 13, 2022 08:42
Generateur de QR Code tous anti covid

go run . &gt; output.png

@owulveryck
owulveryck / canvas.svg
Last active March 15, 2021 14:19
Wardley MAp canvas in SVG + Go
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 December 20, 2020 14:05
Live picture mjpeg remarkable
package main
import (
"bytes"
"compress/zlib"
"context"
"encoding/gob"
"image"
"image/jpeg"
"log"
@owulveryck
owulveryck / monotonic.go
Created December 12, 2020 10:31
Detect if the os has been in sleep mode by looking at the clock
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: