Skip to content

Instantly share code, notes, and snippets.

@nazarewk
nazarewk / .gitignore
Last active Apr 29, 2022
Helm values cannot be overriden with null
View sway log before crash
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
@nazarewk
nazarewk / gist:271137f901a6ef501cdfbf698a0c9b4b
Created Jan 11, 2022
Sway logs for xwayland mouse events bug report
View gist:271137f901a6ef501cdfbf698a0c9b4b
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 Oct 3, 2019
pytest + live-logs doctests
View console-output
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 Sep 28, 2018
Elasticsearch + Kibana minimal docker-compose.yaml
View 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:
@nazarewk
nazarewk / terraformify.jq
Created Jul 2, 2018
Converts JSON values to terraform values (everything as strings)
View terraformify.jq
def nullString: (
if . == null then "" else . end
);
def terraformify: ( .. |=
if type == "object" then
to_entries | map(.value |= nullString) | from_entries
elif type == "array" then
map(nullString)
elif . == true then
View ansible-output.txt
nazarewk@s2 ~/kubernetes/kubernetes-cluster % bin/setup-cluster-configure 10.146.225.{4,5,8,9} (.env)(git)-[master]
DEBUG: Adding group all
DEBUG: Adding group kube-master
DEBUG: Adding group kube-node
DEBUG: Adding group etcd
DEBUG: Adding group k8s-cluster:children
DEBUG: Adding group calico-rr
DEBUG: Adding group vault
DEBUG: adding host node1 to group all
View gist:84d3dc5c9e45d173e7bccbb30a8b55f4
### Keybase proof
I hereby claim:
* I am nazarewk on github.
* I am nazarewk (https://keybase.io/nazarewk) on keybase.
* I have a public key ASA2rSLeFZwg3Evrm4qb93abIEy4DkCSk7EJApydIT4-sQo
To claim this, I am signing this object:
@nazarewk
nazarewk / querysets.py
Created Feb 16, 2017
Integrating elasticsearch_dsl with django
View querysets.py
import functools
from django.db import models
from django.db.models import query
from django.utils.functional import empty
from elasticsearch_dsl import Search
class BaseSearchIterable(query.BaseIterable):
def __init__(self, queryset):