Skip to content

Instantly share code, notes, and snippets.


Krzysztof Nazarewski nazarewk

View GitHub Profile
nazarewk / disable_win10_upgrade.reg
Last active Mar 26, 2016
Disable upgrade to Windows 10 tray icon permantently
View disable_win10_upgrade.reg
Windows Registry Editor Version 5.00
nazarewk /
Created Feb 16, 2017
Integrating elasticsearch_dsl with django
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):
View gist:84d3dc5c9e45d173e7bccbb30a8b55f4
### Keybase proof
I hereby claim:
* I am nazarewk on github.
* I am nazarewk ( on keybase.
* I have a public key ASA2rSLeFZwg3Evrm4qb93abIEy4DkCSk7EJApydIT4-sQo
To claim this, I am signing this object:
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
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
elif . == true then
nazarewk / docker-compose.yaml
Last active Sep 28, 2018
Elasticsearch + Kibana minimal docker-compose.yaml
View docker-compose.yaml
version: '2.4'
- "ES_JAVA_OPTS=-Xms${MEMORY:-256}m -Xmx${MEMORY:-256}m"
- discovery.type=single-node
- bootstrap.memory_lock=true
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
-------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------
INFO qwe
nazarewk / ansible.cfg
Last active Aug 2, 2021
Ansible SSH Agent forwarding with Jump (bastion) host
View ansible.cfg
sudo_flags = SSH_AUTH_SOCK="$SSH_AUTH_SOCK" -H -S -n
ssh_args=-o ForwardAgent=yes