Skip to content

Instantly share code, notes, and snippets.

View gillesdemey's full-sized avatar
♥️
Be kind to others

Gilles De Mey gillesdemey

♥️
Be kind to others
View GitHub Profile
@gillesdemey
gillesdemey / HOWTO.md
Last active March 22, 2024 17:33
Disable ASBL on LG C9 without service remote

Install dependencies

Go ahead and install https://github.com/chros73/bscpylgtv using pip install bscpylgtv or compile from source.

Run command to start the service menu

bscpylgtvcommand <your-TV-ip-address> launch_app_with_params com.webos.app.factorywin "{\"id\":\"executeFactory\", \"irKey\":\"inStart\"}"

Enter PIN

@gillesdemey
gillesdemey / go.mod
Last active March 20, 2023 12:13
Dicom writer
module github.com/gillesdemey/dicom-test
go 1.20
require (
github.com/suyashkumar/dicom v1.0.6 // indirect
golang.org/x/text v0.3.8 // indirect
)
const SUFFIX_MULTIPLIER: Record<string, number> = {
'ms': 1,
's': 1000,
'm': 60 * 1000,
'h': 60 * 60 * 1000,
'd': 24 * 60 * 60 * 1000,
'w': 7 * 24 * 60 * 60 * 1000,
'y': 365 * 24 * 60 * 60 * 1000,
}
asm`addsubtractmemory
 j   k @nameaddsubtractp0p1p0p1t0 memory
@gillesdemey
gillesdemey / index.mjs
Last active June 27, 2021 16:55
Simple graph + walker
import graphlib from 'graphlib'
import { Walker } from './walk.mjs'
const { Graph, json } = graphlib
const graph = new Graph({ directed: true })
/* ┌───┐
* ┌▶│ 5 │───┐
* ┌───┐ ┌───┐ │ └───┘ │ ┌───┐
package main
import (
"context"
"github.com/oklog/run"
"log"
"syscall"
"time"
)
package main
import (
"fmt"
"golang.org/x/sync/errgroup"
"time"
)
func main() {
fmt.Println("Hello, world!")
# also copies over metadata like album art
for i in *.flac; do echo $i; ffmpeg -i "$i" -y -v 0 -vcodec copy -acodec alac "${i%.flac}".m4a && rm -f "$i"; done
package main
import (
"github.com/hashicorp/serf/serf"
"log"
"os"
"os/signal"
"syscall"
)
package main
import (
"fmt"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/simple"
"gonum.org/v1/gonum/graph/traverse"
)
// GraphNode is a node in the DAG