Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Krzysztof Wilczyński kwilczynski

:octocat:
View GitHub Profile
@kwilczynski
kwilczynski / openpgp.md
Created December 21, 2022 20:07
openpgp.md
View openpgp.md

$argon2id$v=19$m=64,t=512,p=2$G/DQSn2+4afFDXZRdR3Vlw$DBvv46nt3EEkY5ehfDVfQQ

View keybase.md

Keybase proof

I hereby claim:

  • I am kwilczynski on github.
  • I am kwilczynski (https://keybase.io/kwilczynski) on keybase.
  • I have a public key whose fingerprint is 12D2 7D5D 8C8E 9BF1 AABC 7C7C 7C64 768D 3DE3 34E7

To claim this, I am signing this object:

View auto-merge.yml
name: "Auto-merge Dependabot Pull Request for Dockerfile updates"
permissions:
pull-requests: write
contents: write
on:
pull_request_target:
branches:
- main
View Dockerfile
FROM registry.access.redhat.com/ubi8/python-39:latest AS builder
ARG psycopg2_version=2.9.5
USER 0
RUN set -eux && \
mkdir -p /build && \
chown 1001 /build
View main.go
package main
import (
"fmt"
"net/url"
"strings"
"unicode/utf8"
)
func normalizePassword(input string, escape bool) (output string) {
View patch.diff
diff -uNr linux-stable/drivers/pci/quirks.c linux-xanmod/drivers/pci/quirks.c
--- linux-stable/drivers/pci/quirks.c 2022-09-09 08:28:12.533768183 +0900
+++ linux-xanmod/drivers/pci/quirks.c 2022-09-09 07:19:42.327689416 +0900
@@ -3601,6 +3601,106 @@
dev->dev_flags |= PCI_DEV_FLAGS_NO_BUS_RESET;
}
+static bool acs_on_downstream;
+static bool acs_on_multifunction;
+
@kwilczynski
kwilczynski / scrtipt.sh
Created July 27, 2022 16:47
Check if an IP (IPv4) address is valid in Jsonnet, a simple example.
View scrtipt.sh
$ cat test.jsonnet
local validateIP(ip) =
local aux(value) =
local mask = std.parseHex("ffffffff");
local octets = std.prune([if x != "" then std.parseInt(x) else null for x in std.split(value, '.')]);
if std.length(octets) != 4 then
false
else
local masked = ((octets[0] << 24) | (octets[1] << 16) | (octets[2] << 8) | (octets[3] << 0) & mask);
if masked < 0 then false else masked <= mask;
@kwilczynski
kwilczynski / gist:dc69ed5acb27a19ec1e29914895d7666
Last active March 30, 2023 17:40
Install lei for kernel development using lore directly on Ubuntu
View gist:dc69ed5acb27a19ec1e29914895d7666
apt install -y vim
apt install -y wget
apt install -y sqlite3 (used by a test, not needed for the build to complete)
apt install -y curl
apt install -y git
apt install -y build-essential
apt install -y pkg-config
View gist:4b2f4650b00cead133e337714260a416
duplicateConditionalAssign ext/nokogiri/xml_node.c:1898 The statement 'if (child_iter->parent!=(xmlNodePtr)node->doc) child_iter->parent=(xmlNodePtr)node->doc' is logically equivalent to 'child_iter->parent=(xmlNodePtr)node->doc'.
View terramate.rb
class Terramate < Formula
desc "Tool for managing multiple Terraform stacks"
homepage "https://github.com/mineiros-io/terramate"
# Disabled. No official release of Terramate yet.
# url ""
# sha256 ""
license "Apache-2.0"
head "https://github.com/mineiros-io/terramate.git", branch: "main"
# Disabled. No official release of Terramate yet.
# livecheck do