Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View pmorch's full-sized avatar

Peter Valdemar Mørch pmorch

View GitHub Profile
@pmorch
pmorch / app-cmp-plugin.yaml
Last active January 20, 2022 22:51
ArgoCD bug: "Configure plugin via sidecar" => child resources not pruned on deletion
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: test-cmd-plugin
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: default
@pmorch
pmorch / emptyfile.puml
Created November 28, 2021 05:43
This is just an empty file for testing a PlantUML "bug"...
' It just contains a comment
@pmorch
pmorch / README.md
Created August 12, 2021 21:01
very incomplete and likely buggy ansi decoder

In order to investigate a bug, I needed an ansi escape code decoder.

This is it.

I just wrote exactly what was required for the bug analysis, so it is bad.

@pmorch
pmorch / KeycloakLogoutableApi.java
Last active November 18, 2020 10:50
Workaround for scribejava: Keycloak: Adding a custom field for the `token` endpoint POST to get Single-Sign-Off to work #980
package dk.lessor.oauth2;
import com.github.scribejava.apis.KeycloakApi;
import com.github.scribejava.core.httpclient.HttpClient;
import com.github.scribejava.core.httpclient.HttpClientConfig;
import com.github.scribejava.core.oauth.OAuth20Service;
import java.io.OutputStream;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@pmorch
pmorch / README.md
Last active November 28, 2019 18:14
AsciiDocFX bug #459: Preview position is way off when editing long documents
@pmorch
pmorch / latency.markdown
Last active August 29, 2018 18:42 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns
Send 2K bytes over 1 Gbps network ....... 20,000 ns
SSD random read ........................ 150,000 ns

Read 1 MB sequentially from memory ..... 250,000 ns

@pmorch
pmorch / 2scans.pcapng
Last active August 10, 2018 09:57
Inconsistent list of hosts found by nmap pings from scan to scan - tcpdump shows ICMP echo replies did arrive
#!/usr/bin/perl -w
use strict;
use IPC::Open2;
=head1 prettier_indent
From:
A way to keep initial indentation when formatting a "snippet" - or part of a
file https://github.com/prettier/prettier/issues/1324#issuecomment-294878202
@pmorch
pmorch / foo.txt
Created February 26, 2017 15:19
A foo text
foo
@pmorch
pmorch / office2013.log
Created January 31, 2017 06:44
Log from attempting to install Office 2013 in wine 2.0
fixme:winediag:start_process Wine Staging 2.0 is a testing version containing experimental patches.
fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
fixme:heap:RtlSetHeapInformation (nil) 1 (nil) 0 stub
fixme:ntdll:EtwEventRegister ({8736922d-e8b2-47eb-8564-23e77e728cf3}, 0x10032734, 0x10068a90, 0x1009b7b0) stub.
fixme:process:GetSystemDEPPolicy stub
fixme:process:SetProcessDEPPolicy (1): stub
fixme:module:load_library unsupported flag(s) used (flags: 0x00001000)
fixme:ntdll:EtwEventRegister ({8736922d-e8b2-47eb-8564-23e77e728cf3}, 0xa07417, 0xc9bbb0, 0xcd9148) stub.
fixme:nls:LocaleNameToLCID unsupported flags 8000000
fixme:module:load_library unsupported flag(s) used (flags: 0x00001000)