Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Wulveryck owulveryck

View GitHub Profile
@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 Nov 27, 2021
Generateur de QR Code tous anti covid
View AAA README.md

go run . > 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 .
@owulveryck
owulveryck / index.html
Last active Nov 8, 2020
Execution of the tiny-yolo v2 with Gorgonia an the gomachine visualised with d3js
View index.html
<!DOCTYPE html>
<head>
<title>My chart</title>
<meta charset="UTF-8">
<script src="https://unpkg.com/timelines-chart@2"></script>
</head>
<body>
<div id="myPlot"></div>
<script>
const data = [{"group":"gorgonia.org/gorgonia/x/vm.receiveInput","data":[{"label":"Reshape(16, 27)(%0)","data":[{"timeRange":["2020-08-10T16:38:17.77308+02:00","2020-08-10T16:38:17.773081+02:00"],"val":"11"}]},{"label":"Reshape(1024, 4608)(%6)","data":[{"timeRange":["2020-08-10T16:38:17.773053+02:00","2020-08-10T16:38:17.773143+02:00"],"val":"103"}]},{"label":"+ false(%79, %7a)","data":[{"timeRange":["2020-08-10T16:38:17.773056+02:00","2020-08-10T16:38:17.773149+02:00"],"val":"123"}]},{"label":"Reshape(512, 2304)(%5)","data":[{"timeRange":["2020-08-10T16:38:17.773048+02:00","2020-08-10T16:38:17.773153+02:00"],"val":"88"}]},{"label":"+ false(%5c, %5d)","data":[{"timeRange":["2020-08-10T16:38:17.773011+02:00","2020-08-10T16:38:17.773176+02:00"],"val":"94"}]},{"label":"+ false(%4d, %4e)","data":[{"timeRange":["2020-08-10T16:
View broadcast.go
func broadcast(ctx context.Context, ch <-chan gorgonia.Value, cs []chan gorgonia.Value) {
for {
select {
case msg := <-ch:
for _, c := range cs {
select {
case c <- msg:
case <-ctx.Done():
return
}