Skip to content

Instantly share code, notes, and snippets.

View kwilczynski's full-sized avatar

Krzysztof Wilczyński kwilczynski

  • Yokohama, Japan
  • 20:32 (UTC +09:00)
View GitHub Profile
@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
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'.
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
>>> 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
server_names = [
'cloudflare',
'doh-crypto-sx',
'ams-doh-nl',
# Possible issues.
# 'faelix-ch-ipv4-doh',
'doh.ffmuc.net'
]
listen_addresses = [
// Based on https://github.com/ericwbailey/millennials-to-snake-people.
function walkTextNodes(rootNode) {
let walker = document.createTreeWalker(rootNode, NodeFilter.SHOW_TEXT,
function(node) {
if (node.textContent.length === 0) {
return NodeFilter.FILTER_SKIP;
}
return NodeFilter.FILTER_ACCEPT
},
@kwilczynski
kwilczynski / script.sh
Last active June 24, 2024 00:48
Build cppcheck
make clean
export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
make DESTDIR='/tmp/cppcheck' MATCHCOMPILER=yes HAVE_RULES=yes FILESDIR='/usr/share/cppcheck' CXXFLAGS='-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function' -j$(nproc) install
OR
sudo make MATCHCOMPILER=yes HAVE_RULES=yes FILESDIR='/usr/share/cppcheck' CXXFLAGS='-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function' -j$(nproc) install