Skip to content

Instantly share code, notes, and snippets.

View FxKu's full-sized avatar

Felix Kunde FxKu

View GitHub Profile
@FxKu
FxKu / fix_img_links.py
Created April 29, 2019 20:39
Fix broken image links
@FxKu
FxKu / ST_ClusterIntersecting.sql
Last active June 7, 2019 20:46
Grouping intersecting lines
-- TIL: Create groups of intersecting lines (split by type)
-- first, create some example intersecting and non-intersecting lines
WITH lines(id, geom, type) AS (
VALUES (1, 'LINESTRING(1 1,3 1)'::geometry, 'type_A'),
(2, 'LINESTRING(2 1,2 2)'::geometry, 'type_A'),
(3, 'LINESTRING(3 2,4 2)'::geometry, 'type_A'),
(4, 'LINESTRING(3 1,3 2)'::geometry, 'type_B'),
(5, 'LINESTRING(3 2,3 3)'::geometry, 'type_B')
)
SELECT type, ST_AsText(
@FxKu
FxKu / zz_generated.deepcopy.go
Created October 20, 2020 13:54
Operator codegen
// +build !ignore_autogenerated
/*
Copyright 2020 Compose, Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@FxKu
FxKu / codegen-volume-with-selector-api.go
Created March 26, 2021 10:45
Codegen after adding selector to Volume API
// +build !ignore_autogenerated
/*
Copyright 2021 Compose, Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@FxKu
FxKu / k8sres_test.go
Last active April 6, 2022 11:46
Testing generation of env vars
package cluster
import (
"context"
"fmt"
"reflect"
"sort"
"time"
"testing"