Skip to content

Instantly share code, notes, and snippets.

View kwilczynski's full-sized avatar
🐧

Krzysztof Wilczyński kwilczynski

🐧
  • Yokohama, Japan
  • 13:24 (UTC +09:00)
View GitHub Profile
@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
@justin808
justin808 / .pryrc
Last active June 7, 2024 02:35
Updated .pryrc with option to remove pry-byebug
# Using these pry gems -- copy to your Gemfile
# group :development, :test do
# gem 'awesome_print' # pretty print ruby objects
# gem 'pry' # Console with powerful introspection capabilities
# # pick either:
# # using byebug, but has issues with Zeitwerk
# gem 'pry-byebug' # Integrates pry with byebug
#
# # using default ruby debuggger
# gem 'pry-stack_explorer'
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
@BH1SCW
BH1SCW / mount_qcow2.md
Created November 18, 2021 07:39 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@sleepyfox
sleepyfox / foxs-laws-of-software-development.md
Last active October 22, 2025 19:36
Fox's Laws of Software Development
author: @sleepyfox
title: Fox's laws of software development
date: 27 October 2021
preamble: A not entirely serious treatise on the immutable fundamental laws of software development activities

Fox's laws of software development

A not entirely serious treatise

>>> a = 975205316
>>> b = 4096
>>> (a + b) - (a % b)
975208448
>>> ((a + b) - (a % b)) + 64
975208512
>>> 975208448 % 4096
0
>>> a + (b - 1) & ~(b - 1)
975208448
@kwilczynski
kwilczynski / config.txt
Last active December 25, 2022 17:45
Raspberry Pi 4 - /boot/config.txt
dtparam=i2c=off
dtparam=i2s=off
dtparam=spi=off
dtparam=uart0=off
dtparam=uart1=off
dtparam=audio=off
dtoverlay=disable-wifi
ARG go_version=1.17
ARG alpine_version=latest
FROM golang:${go_version}-alpine AS builder
ARG GOOS=linux
ARG GOARCH=amd64
ENV GOOS=${GOOS}
ENV GOARCH=${GOARCH}
@kwilczynski
kwilczynski / cmdline.txt
Last active November 18, 2021 04:00
Raspberry Pi 4 - /boot/cmdline.txt
coherent_pool=1M
8250.nr_uarts=1
dwc_otg.fiq_fix_enable=1
dwc_otg.lpm_enable=0
dwc_otg.microframe_schedule=1
dwc_otg.nak_holdoff_enable=1
sdhci-bcm2708.missing_status=0
snd_bcm2835.enable_compat_alsa=0
snd_bcm2835.enable_hdmi=1
bcm2708_fb.fbwidth=0