Skip to content

Instantly share code, notes, and snippets.

$ gdb ./print_time /tmp/print_time.22639.core
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.2) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@defanator
defanator / clock_gettime-gdb.txt
Last active June 5, 2025 13:11
watchmaker on 5.15.0-1083-aws aarch64 (abi.ptrauth_disabled=1), AWS t4g.medium
$ gdb ./clock_gettime /tmp/3472.core
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.2) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@defanator
defanator / compose.yml
Created May 14, 2025 12:55
alloy conversion from native loki to OTLP
networks:
grafana:
name: grafana
services:
loki:
container_name: loki
image: docker.io/grafana/loki:3.5.0
command: -config.file=/etc/loki/loki.yml
volumes:
@defanator
defanator / zigbee2mqtt.log
Created March 8, 2025 05:23
IKEA Rodret E2201 OTA update log
This file has been truncated, but you can view the full file.
[2025-03-07 15:14:47] info: z2m: Updating 'controls/rodret1' to latest firmware
[2025-03-07 15:14:53] info: z2m:mqtt: MQTT publish: topic 'z2m/controls/rodret1', payload '{"battery":100,"identify":null,"last_seen":"2025-03-07T15:14:53+00:00","linkquality":232,"update":{"installed_version":16777287,"latest_version":16777303,"state":"available"}}'
[2025-03-07 15:14:54] info: zhc:ota: [0x5cc7c1fffea5689e | RODRET Dimmer] Getting latest image, meta: {"fileName":"rodret-dimmer-soc_release_prod_v16777303_0a78457a-950c-4903-bfd1-67902aa66cf9.ota","fileVersion":16777303,"fileSize":268502,"url":"https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/IKEA/rodret-dimmer-soc_release_prod_v16777303_0a78457a-950c-4903-bfd1-67902aa66cf9.ota","imageType":4557,"manufacturerCode":4476,"sha512":"0f248c6036c323f5d56158b9451d1e73b1a7935b8628bdff6a58590ce2e6625b4bdd0772c5a1318eb8302ab6601170dfeed1ebc0e8eafe6de686e5b98f56c883","otaHeaderString":"GBL rodret_dimmer_soc\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u00
@defanator
defanator / Vagrantfile
Created February 21, 2025 13:13
Vagrantfile for ARM macOS and VMWare Desktop/Fusion
Vagrant.configure("2") do |config|
config.vm.define "ubuntu2404_gyptazy", autostart: false do |cfg|
cfg.vm.box = "gyptazy/ubuntu24.04-server-arm64"
cfg.vm.box_version = "1.0.0"
cfg.vm.network "private_network", type: "dhcp"
#cfg.vm.synced_folder ".", "/vagrant"
cfg.vm.provision "shell",
inline: "printf \"%s\" \"vagrant ALL=(ALL:ALL) ALL\" >/etc/sudoers.d/vagrant-nopassw"
@defanator
defanator / output.txt
Created February 10, 2025 17:57
vagrant 2.4.3 issue with virtualbox 7.1.6
% vagrant
<internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': ffi_prep_cif failed. status=0x2 (fatal)
from <internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from /opt/vagrant/embedded/gems/gems/ffi-1.17.0/lib/ffi.rb:5:in `rescue in <top (required)>'
from /opt/vagrant/embedded/gems/gems/ffi-1.17.0/lib/ffi.rb:2:in `<top (required)>'
from <internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from <internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from /Users/defan/.vagrant.d/gems/3.3.6/gems/virtualbox-0.8.6/lib/virtualbox/com/ffi/interface.rb:1:in `<top (required)>'
from <internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
from <internal:/opt/vagrant/embedded/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
@defanator
defanator / nokia-router-cfg-tool.py
Created September 9, 2023 16:16 — forked from thedroidgeek/nokia-router-cfg-tool.py
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@defanator
defanator / vagrant-version.txt
Created June 19, 2023 04:29
vagrant version output from vagrant/2.3.7 with virtualbox plugin 0.8.6 on macOS 13.4
INFO global: Vagrant version: 2.3.7
INFO global: Ruby version: 3.1.4
INFO global: RubyGems version: 3.3.26
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.3.7/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/gems/vagrant-2.3.7/plugins/synced_folders/nfs/plugin.rb
@defanator
defanator / wordsearch.py
Last active June 4, 2023 11:27
word search in python
#!/usr/bin/env python3
# vim:sw=4:ts=4:et:
#
# based on https://www.tutorialspoint.com/word-search-in-python
BOARD = [
['A', 'B', 'C', 'E'],
['S', 'F', 'R', 'S'],
['A', 'D', 'E', 'E'],
['T', 'I', 'G', 'R'],
@defanator
defanator / need-restart.sh
Created October 26, 2022 18:15
find services using deleted libraries
#!/bin/bash
PIDS=$(ps h --ppid 2 -p 2 --deselect | awk '{ print $1}' | xargs)
for P in $PIDS
do
lsof -p $P | grep DEL | egrep -v "/dev/|/\[aio\]|/SYSV|/memfd:"
done