Skip to content

Instantly share code, notes, and snippets.

@a-tal
a-tal / kube_merge_configs.py
Created June 6, 2018 14:12
kube merge configs
"""Merge or unmerge kubernetes config files.
Usage:
kube_merge_configs.py [options] <conf_yaml>
Options:
--unmerge, -u Remove the input file from your main config
--noop Don't write the main config, dump to stdout
"""

Keybase proof

I hereby claim:

  • I am a-tal on github.
  • I am atal (https://keybase.io/atal) on keybase.
  • I have a public key whose fingerprint is BBFD 6BAE 260E 7CD0 65DD 009D 842F 28FF 9C2F B6D7

To claim this, I am signing this object:

@a-tal
a-tal / id_ranges.md
Last active March 9, 2024 17:34
EVE Online ID ranges
from to description
0 10,000 System items (including junkyards and other special purpose items
500,000 1,000,000 Factions
1,000,000 2,000,000 NPC corporations
3,000,000 4,000,000 NPC characters (agents and NPC corporation CEO's)
9,000,000 10,000,000 Universes
10,000,000 11,000,000 NEW-EDEN Regions
11,000,000 12,000,000 Wormhole Regions
12,000,000 13,000,000 Abyssal regions
@a-tal
a-tal / status.json
Created September 22, 2017 22:19
example ESI status.json result
[
{
"endpoint": "esi-fittings",
"method": "delete",
"route": "/characters/{character_id}/fittings/{fitting_id}/",
"status": "green",
"tags": [
"Fittings"
]
},
@a-tal
a-tal / list_esi_endpoints.py
Created August 25, 2017 21:20
list ESI endpoints by auth requirement
import json
import requests
def main():
spec = requests.get("https://esi.tech.ccp.is/latest/swagger.json").json()
print("## requires auth\n{}\n".format(
"\n".join(sorted(
" - {} {}".format(z, x) for
x, y in spec["paths"].items() for
"""Example code for using gevent and subprocess to run a command
with shell while streaming stdout and stderr to logging.
"""
import logging
from gevent import Greenlet, iwait, joinall
from gevent.subprocess import Popen, PIPE
logging.basicConfig(level=logging.DEBUG)
@a-tal
a-tal / box_game.py
Last active August 29, 2015 14:12
strategy X
"""python proof for: https://www.youtube.com/watch?v=eivGlBKlK6M
100 boxes randomly containing numbers 1-100.
50 choices per player.
100 players numbered 1-100.
all players must find their number in a box to win.