Skip to content

Instantly share code, notes, and snippets.

@leophys
leophys / sway-coredump.1.log
Created April 9, 2020 09:43
Qt5-application-related sway coredumps
Mar 31 10:00:21 emmy sway[1514]: xkbcommon: ERROR: Couldn't read Compose file /usr/share/X11/locale/: No such device
Mar 31 10:00:21 emmy sway[1514]: [091 10:00:21.674037] [glfw error 65544]: Failed to create XKB compose table for locale
Mar 31 10:00:21 emmy sway[1514]: xkbcommon: ERROR: Couldn't read Compose file /usr/share/X11/locale/: No such device
Mar 31 10:00:21 emmy sway[1514]: [091 10:00:21.679748] [glfw error 65544]: Failed to create XKB compose table for locale
Mar 31 10:00:21 emmy sway[1514]: xkbcommon: ERROR: Couldn't read Compose file /usr/share/X11/locale/: No such device
Mar 31 10:00:21 emmy sway[1514]: [091 10:00:21.685593] [glfw error 65544]: Failed to create XKB compose table for locale
Mar 31 10:00:21 emmy sway[1514]: xkbcommon: ERROR: Couldn't read Compose file /usr/share/X11/locale/: No such device
Mar 31 10:00:21 emmy sway[1514]: [091 10:00:21.691244] [glfw error 65544]: Failed to create XKB compose table for locale
Mar 31 10:00:21 emmy sway[1514]: xkbcommon: ERROR: Couldn't read Compose
@leophys
leophys / I-still-dont-get-async-await.md
Created April 2, 2019 14:21
Tinkering with async/await in python>3.5

Async/await magic

As far as I got from the internet, the async/await stuff is a sort of paradigm enrichment of the python ecosystem. One can now access a for of concurrent execution thanks to an event loop. Much like in the browser. I'm ok with that, but I don't really get how to bridge what one knows from the classic synchronous execution workflow, so I experimented a bit. The async_iter_over_tcp.py is just a playground that can be invoked like this (ITER_TIMES defaults to 5):

FROM debian:stretch
ARG UID=1000
ENV DEBIAN_FRONTEND=noninteractive
ENV TARGETDIR="/home/builder/target"
RUN apt-get update \
&& apt-get install -y \
build-essential \
curl \
@leophys
leophys / build-tmux.sh
Last active October 19, 2018 08:38 — forked from sdygt/build-tmux.sh
HOWTO build a statically linked tmux in one script (downloads and builds dependencies from source)
#!/bin/bash
if [ -z "${TARGETDIR}" ]; then
TARGETDIR=$(realpath $PWD)
fi
NCORES=${1:-"1"}
echo "TARGETDIR=${TARGETDIR}"
echo "NCORES=${NCORES}"
@leophys
leophys / git-merge-pick
Last active June 28, 2018 14:46
An extension for git to git-merge a single specified file from another revision
#!/usr/bin/env bash
usage () {
cat << EOH
git merge-pick [flags] <tree-ish> path/to/file
being <tree-ish> a commit-like object (a commit sha1,
a branch name or a tag).
[flags]
@leophys
leophys / HOWTO.rst
Last active April 13, 2018 08:31
Quick intro to iSCSI

iSCSI

TGT - Server side

Using tgt from tgt aur package. Following this guide from fedora.

Create a user