Skip to content

Instantly share code, notes, and snippets.

@kireal
kireal / xed.cfg
Created May 8, 2026 20:08
My Q3 config
// generated by quake, do not modify
unbindall
bind TAB "+scores"
bind ENTER "+button2"
bind ESCAPE "togglemenu"
bind SPACE "weapon 7"
bind + "sizeup"
bind - "sizedown"
bind / "weapnext"
bind 0 "weapon 10"
@kireal
kireal / xed.cfg
Created May 8, 2026 20:07
My CS 1.6 config
// This file is overwritten whenever you change your user settings in the game.
// Add custom configurations to the file "userconfig.cfg".
unbindall
bind "TAB" "+showscores"
bind "ENTER" "+attack"
bind "ESCAPE" "cancelselect"
bind "SPACE" "+jump"
bind "'" "+moveup"
bind "+" "sizeup"
@kireal
kireal / map_creation.chat
Created August 11, 2025 21:44
codex map creation chat
user
SYSTEM
You are a cartographer-engineer. Use web access and Python to produce an accurate political map. Cite sources you use. Do not free-draw. Use authoritative data (Natural Earth). Follow the user specification exactly. Produce both SVG and high-resolution PNG. After rendering, run a self-check: (1) country count = 47, (2) labels visible/non-overlapping, (3) microstates shown with callouts, (4) disputed areas policy applied. If any check fails, fix and re-render.
USER
Goal: Create a labeled political map of Europe that meets this spec.
1. Scope & countries
Include and label these 47 sovereign states: Albania; Andorra; Austria; Belarus; Belgium; Bosnia and Herzegovina; Bulgaria; Croatia; Cyprus; Czechia; Denmark; Estonia; Finland; France; Germany; Greece; Hungary; Iceland; Ireland; Italy; Kosovo; Latvia; Liechtenstein; Lithuania; Luxembourg; Malta; Moldova; Monaco; Montenegro; Netherlands; North Macedonia; Norway; Poland; Portugal; Romania; Russia (European part); San Marino; Serbia; Slovakia; Sloven
@kireal
kireal / scale_with_coroutine.py
Last active August 24, 2021 21:48
Scale up AWS calls with coroutines
# import goes here
# client that runs ecs task
def call_ecs_task(ecs_client, payload):
results = ecs_client.run_task()
pass
# client that runs lambda task
@kireal
kireal / lambda_ecs.py
Last active August 23, 2021 20:55
Lambda import in ecs container
# import goes here
def lambda_handler(event, context):
# lambda code goes here
pass
if __name__ == '__main__': # in case if we run it in a container
if 'EVENT' not in os.environ:
raise Exception('No event provided in os.environ.')
else:
@kireal
kireal / odbcinst.ini
Created October 26, 2016 02:41
Enable ODBC trace
[ODBC]
Trace=1
ForceTrace=1
TraceFile=/tmp/Trace.txt
TraceLibrary=libodbctrac.so
@kireal
kireal / env_sas.sas
Created October 14, 2016 16:58
Get env from macro
%let LD_LIBRARY_PATH =%sysget(LD_LIBRARY_PATH);
%put LD_LIBRARY_PATH is &LD_LIBRARY_PATH;
%let ODBCINST =%sysget(ODBCINST);
%put ODBCINST is &ODBCINST;
@kireal
kireal / git_restore.sh
Created October 13, 2016 18:42
Git restore deleted files
git rev-list -n 1 HEAD -- <file_path>
git checkout <deleting_commit>^ -- <file_path>
@kireal
kireal / deduplication_mongod.py
Last active February 12, 2018 18:43
Run to deduplicate mongodb collection
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Deduplication collection mongodb database utility.
#
# Works only with pymongo >= 3.0
# Kireal
#
# 01.10.2016
# Last change: 04.10.2016
@kireal
kireal / docker_outbound
Created August 27, 2016 05:45
Docker outbound connection
The FORWARD chain does need policy set to ACCEPT if you have --iptables=false. It only appears this is not needed because the Docker installation package auto starts Docker and adds iptable rules the FORWARD chain. When afterwards you add --iptables=false to your config and restart docker those rules are still there. After the next reboot these rules will be gone and your containers wont be able to communicate unless you have the FORWARD chain policy set to ACCEPT.
What you need for a setup that allows filtering with UFW, inter container networking and outbound connectivity is
start docker with --iptables=false
FORWARD chain policy set to ACCEPT
add the following NAT rule:
iptables -t nat -A POSTROUTING ! -o docker0 -s 172.17.0.0/16 -j MASQUERADE