Skip to content

Instantly share code, notes, and snippets.

View kwilczynski's full-sized avatar
🐧
Have you built a Linux kernel recently?

Krzysztof Wilczyński kwilczynski

🐧
Have you built a Linux kernel recently?
  • Yokohama, Japan
  • 04:24 (UTC +09:00)
View GitHub Profile
@kwilczynski
kwilczynski / openpgp.md
Created December 21, 2022 20:07
openpgp.md

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

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:

name: "Auto-merge Dependabot Pull Request for Dockerfile updates"
permissions:
pull-requests: write
contents: write
on:
pull_request_target:
branches:
- main
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
package main
import (
"fmt"
"net/url"
"strings"
"unicode/utf8"
)
func normalizePassword(input string, escape bool) (output string) {
@kwilczynski
kwilczynski / scrtipt.sh
Created July 27, 2022 16:47
Check if an IP (IPv4) address is valid in Jsonnet, a simple example.
$ 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;
package main
import (
"context"
"flag"
"fmt"
"net"
"os"
"time"
@BH1SCW
BH1SCW / arm64.md
Created January 19, 2022 01:43 — forked from george-hawkins/arm64.md
Running virtualized x86_64 and emulated arm64 Ubuntu cloud images using QEMU

QEMU arm64 cloud server emulation

This is basically a rehash of an original post on CNXSoft - all credit (particularly for the Virtio device arguments used below) belongs to the author of that piece.

Download the latest uefi1.img image. E.g. ubuntu-16.04-server-cloudimg-arm64-uefi1.img from https://cloud-images.ubuntu.com/releases/16.04/release/

Download the UEFI firmware image QEMU_EFI.fd from https://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/

Determine your current username and get your current ssh public key:

@darkclip
darkclip / keychron_linux.md
Created January 13, 2022 07:02 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ Bluetooth fixes)

Here is the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

In order to change this, you need to change the fnmode parameter for the hid_apple kernel module. Here's some documentation on it, but a quick summary can be found below:

@kwilczynski
kwilczynski / gist:dc69ed5acb27a19ec1e29914895d7666
Last active May 30, 2024 19:15
Install lei for kernel development using lore directly on Ubuntu
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