Skip to content

Instantly share code, notes, and snippets.

View nazarewk's full-sized avatar

Krzysztof Nazarewski nazarewk

  • Poland
  • 00:49 (UTC +02:00)
View GitHub Profile
@nazarewk
nazarewk / README.md
Last active November 9, 2023 10:05
Podman container exit killing Sway WM (running as a systemd service)

the issue

sway process stops as soon as podman container exits, eg podman run --rm -it bash -c 'exit 0'

see resolution.md

background

For the last 1-2 years after switching XFCE on Arch Linux to Sway (Wayland) on NixOS I had on and off issues with podman container exits resulting in sway window manager exiting.

It might have been caused by moving sway process inside a systemd service, but at the beginning I was not using enough containers to pinpoint the time.

@nazarewk
nazarewk / README.md
Created October 26, 2023 12:35
Standalone Nix module for modelling JSON data

This is an example of a standalone single-file module that outputs a JSON file out of it's configuration.

Standalone in this context means it's not meant to be used by NixOS or Home Manager configurations.

@nazarewk
nazarewk / message.md
Created October 20, 2023 12:31
a message on KDE describing issues

this seems like something fit for the channel, I'm getting coredumps whenever running (some) stuff under Plasma Wayland

kkdn@krul ~ [SIGABRT]> xdg-which org.kde.plasma.emojier.desktop
*** buffer overflow detected ***: terminated
fish: Job 1, 'xdg-which org.kde.plasma.emojie…' terminated by signal SIGABRT (Abort)
kdn@krul ~ [SIGABRT]> 

but not through SSH:

@nazarewk
nazarewk / README.md
Last active October 12, 2023 13:58
difftastic wrapper providing HTML and easier consumable JSON outputs

This is a pure-Python script which builds on top of difftastics --display json to provide:

  • more ergonomic and ready to use JSON output
  • slightly styled HTML table (mimics side-by-side)

it addresses following shortcomings of current (v0.51.1) JSON output:

  • line-scoped changes within block-scoped chunks are unordered (different each time), had to be sorted by rhs.line_number then lhs.line_number
  • there seems to be a lot of conscutive single-character entries of same type (highlight) for some (probably unknown?) languages, those are merged

addresses Wilfred/difftastic#45

@nazarewk
nazarewk / .gitignore
Last active April 29, 2022 11:01
Helm values cannot be overriden with null
templates/
This file has been truncated, but you can view the full file.
-- Journal begins at Thu 2022-02-17 19:32:53 CET, ends at Tue 2022-03-01 11:01:40 CET. --
Mar 01 10:41:40 nazarewk-krul /nix/store/98sf58748yqq51197whkqc4ik0sr2mmh-gdm-41.3/libexec/gdm-wayland-session[5394]: 02:33:32.833 [DEBUG] [sway/desktop/xwayland.c:704] New xwayland surface title='(null)' class='(null)'
Mar 01 10:41:40 nazarewk-krul /nix/store/98sf58748yqq51197whkqc4ik0sr2mmh-gdm-41.3/libexec/gdm-wayland-session[5394]: 02:33:32.833 [DEBUG] [wlr] [xwayland/xwm.c:833] unhandled X11 property 492 (XSEL_DATA) for window 46137345
Mar 01 10:41:40 nazarewk-krul /nix/store/98sf58748yqq51197whkqc4ik0sr2mmh-gdm-41.3/libexec/gdm-wayland-session[5394]: 02:33:33.087 [DEBUG] [sway/desktop/xwayland.c:704] New xwayland surface title='(null)' class='(null)'
Mar 01 10:41:40 nazarewk-krul /nix/store/98sf58748yqq51197whkqc4ik0sr2mmh-gdm-41.3/libexec/gdm-wayland-session[5394]: 02:33:33.088 [DEBUG] [wlr] [xwayland/xwm.c:833] unhandled X11 property 492 (XSEL_DATA) for window 46137345
Mar 01 10:41:40 nazarewk-krul /nix/store/98s
@nazarewk
nazarewk / README.md
Last active March 1, 2022 10:09
Sway SIGSEGV
@nazarewk
nazarewk / gist:271137f901a6ef501cdfbf698a0c9b4b
Created January 11, 2022 08:59
Sway logs for xwayland mouse events bug report
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.567 [DEBUG] [sway/desktop/xwayland.c:686] New xwayland surface title='(null)' class='(null)'
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.567 [DEBUG] [wlr] [xwayland/selection/outgoing.c:375] XCB_SELECTION_REQUEST (time=3882857 owner=2097153, requestor=33554433 selection=275, target=254, property=497)
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.567 [DEBUG] [wlr] [xwayland/selection/outgoing.c:296] Sending Wayland selection 254 to Xwayland window with MIME type text/plain;charset=utf-8, target 254, transfer 0x14bccd0
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.567 [DEBUG] [wlr] [xwayland/selection/outgoing.c:215] Starting transfer 0x14bccd0
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.568 [DEBUG] [wlr] [xwayland/selection/outgoing.c:92] read 168 bytes (available 65536, mask 0x1)
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.568 [DEBUG] [wlr] [xwayland/selection/outgoing.c:145] nothing happened, buffered the bytes
Jan 11 09:57:09 nazarewk sway[3125]: 01:03:52.
@nazarewk
nazarewk / console-output
Created October 3, 2019 10:12
pytest + live-logs doctests
e-kfni@nazarewk-portable ~/dev/nazarewk/pytest-live-logs-error % pytest
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.4, pytest-5.2.0, py-1.8.0, pluggy-0.13.0
rootdir: /home/e-kfni/dev/nazarewk/pytest-live-logs-error, inifile: pytest.ini
collected 1 item
example.py::example.do
-------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------
INFO example:example.py:11 qwe
FAILED
@nazarewk
nazarewk / docker-compose.yaml
Last active September 28, 2018 09:57
Elasticsearch + Kibana minimal docker-compose.yaml
version: '2.4'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1
environment:
- "ES_JAVA_OPTS=-Xms${MEMORY:-256}m -Xmx${MEMORY:-256}m"
- discovery.type=single-node
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
ulimits: