Skip to content

Instantly share code, notes, and snippets.

grep -ir "python3_{10..11}" /var/db/repos/gentoo/* | wc -l

@yuri1969
yuri1969 / etc portage make.conf
Last active October 4, 2024 20:17
Gentoo Portage make.conf - ThinkPad T480
###################################################
#
# ThinkPad T480
#
# i7-8550U, 9th Gen Intel GFX, SSD WD NS720 512G
#
###################################################
# Prefer stability over agressive optimizations
# Use '-march=native' since working fine; check: 'echo | gcc -### -E - -march=native'
@yuri1969
yuri1969 / kafka.sh
Last active November 30, 2023 15:55
cheat
echo 'security.protocol=SSL' > ~/kafka-client.properties
export KAFKA_HEAP_OPTS='-Xmx2g'
# ./bin/kafka-consumer-groups.sh --bootstrap-server <host:port> --timeout 15000 --command-config kafka-client.properties --group '<consumer_group_name>' --topic '<topic>:<partition>' --reset-offsets --to-offset <offset> --dry-run
./bin/kafka-consumer-groups.sh --bootstrap-server '...amazonaws.com:9094' --timeout 15000 --command-config ~/kafka-client.properties --group 'kestra_executor_main' --topic 'kestra_execution:7' --reset-offsets --to-offset 8915 --dry-run
# append '--execute' to commit
https://github.com/tchiotludo/akhq/blob/0377877a2e55c2fc4b78394062c1bfefb61206b9/client/src/containers/Topic/Topic/TopicData/TopicData.jsx#L36
https://github.com/tchiotludo/akhq/blob/0377877a2e55c2fc4b78394062c1bfefb61206b9/client/src/containers/Topic/Topic/TopicData/TopicData.jsx#L474
https://github.com/remix-run/remix/issues/2813#issuecomment-1458138043
https://stackoverflow.com/a/71205013/2088053
https://dofsimulator.net/en/?x=EQaAyQEGgAAMIkwkAAADgAA
@yuri1969
yuri1969 / kcat.md
Last active September 26, 2023 20:36
kcat / kafkacat

Kcat

Installation

  • dnf install -y kcat
  • apt-get install kafkacat

Usage

Print broker info:

@yuri1969
yuri1969 / vue
Created June 28, 2023 21:42
Vue Element Plus select
<template>
<el-select
:model-value="options"
@update:model-value="onInput"
multiple
filterable
allow-create
default-first-option
clearable
collapse-tags
@yuri1969
yuri1969 / xkcd.md
Last active September 19, 2023 14:01
XKCD list
@yuri1969
yuri1969 / run_kernel_compile.sh
Last active June 2, 2023 20:37
Run kernel compile
#!/bin/bash
cd /usr/src/linux || { echo 'Failed to switch to /usr/src/linux' >&2; exit 1; }
chrt -i 0 ionice -c 3 make -j "$(nproc)" || \
{ echo 'Failed to compile the kernel' >&2; exit 1; }
@yuri1969
yuri1969 / thinkfan.conf
Last active November 27, 2022 09:45
Thinkfan config file for Lenovo T430
sensors:
# thinkpad_acpi
- tpacpi: /proc/acpi/ibm/thermal
indices: [0]
fans:
# thinkpad_acpi to allow disengaged and automatic modes
- tpacpi: /proc/acpi/ibm/fan
levels: