Skip to content

Instantly share code, notes, and snippets.

{"time":"2024-02-15T22:29:16.0589779-07:00","level":"INFO","msg":"generating client GUID"}
{"time":"2024-02-15T22:29:16.0592392-07:00","level":"INFO","msg":"starting application"}
{"time":"2024-02-15T22:29:16.0592392-07:00","level":"INFO","msg":"constructing DCS client"}
{"time":"2024-02-15T22:29:16.0592392-07:00","level":"INFO","msg":"connecting to DCS-gRPC server","address":"localhost:50051"}
{"time":"2024-02-15T22:29:16.0597474-07:00","level":"INFO","msg":"constructing SRS client"}
2024-02-15 22:29:16.0658 | Ciribob.DCS.SimpleRadio.Standalone.Server.Network.SRSClientSession | Client connected: IP 127.0.0.1 | Port 53900
{"time":"2024-02-15T22:29:16.0658799-07:00","level":"DEBUG","msg":"sending message","message":{"Version":"v0.0.0-dev","MessageType":2,"Clients":[{"Name":"SkyEye Bot","ClientGuid":"zDJGSi68CDbfpJvsqKSSAi","Seat":0,"Coalition":0,"AllowRecord":true,"RadioInfo":{"unitId":0,"unit":"","radios":[{"freq":133,"modulation":0,"enc":false,"encKey":0,"secFreq":243,"retransmit":false}],"iff":{"control":2
@dharmab
dharmab / rant.txt
Created April 18, 2023 03:11
Jak's hornet rant
Jak: Hornet rant was last updated 25 August 2021
Trackfile ranking. First, MSI trackfile rank processing is wrong. The L&S/DT2 designations are affecting trackfile rank which is incorrect. They only affect priority, which is different.
Rank is only changed by relative position/velocity and friendly/unknown/hostile ID. It's a general indication of the threats targets pose to you. The bugged behavior results in an L&S/DT2 designation essentially 'rupturing' through all ranks and bumping them up, which is wrong. Friendlies should also not have a visible rank.
The L&S star and DT2 diamond can be thought of as going on top of the rank number on the HAFU, hiding it but not really changing it. The rank is still there and unchanged. For example: trackfile with rank of 4 is designated as the L&S. The star symbol replace the 4. It's still rank 4, and therefore the ranks of other tracks aren't affected. (edited)
[8:00 PM]Jak: Priority. This then ties into HAFU display logic. The top eight priority HAFUs are always di
@dharmab
dharmab / k8s-proxy.py
Created January 31, 2022 17:40
k8s-proxy.py
from typing import Optional, Any, Union, Dict, List, Set
import json
import kubernetes.client
import urllib3.response
from yarl import URL
import functools
import operator
import datetime
import dataclasses
@dharmab
dharmab / text.md
Last active November 3, 2019 23:40
So you wanna get a sportbike?

So You Wanna Get a Sportbike?

Based on the original, updated 2019

First Things First: Before You Buy a Bike

Before you buy a motorcycle, you need to buy some gear, and you need to take a rider education course and get your motorcycle endorsement on your license. In most US states the course is the Motorcycle Safety Foundation Basic RiderCourse. In California the [California Motorcyclist

#!/bin/bash
#
# Rotates SSH private and public keys for DX clusters and uploads them to Vault.
# Run from a directory containing the k8s-kubeconfig file.
mkdir -p k8s_ssh
rm -rf k8s_ssh/*
for cluster in $(kubectl config get-contexts -o name | grep 'ethos1[134]'); do
while IFS='-'; read -ra tokens <<< "$cluster"; do
envionment="${tokens[1]}"
#!/usr/bin/env python3
from collections import deque
from time import sleep
import urllib3.exceptions
from typing import Dict, Iterable, Optional
import argparse
import asyncio
import datetime
import math
def drain_node(*, node: kubernetes.client.models.V1Node, k8s_client: kubernetes.client.CoreV1Api):
logger.info('Evicting all Pods from Node {node.metadata.name}')
# https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/#the-eviction-api
while True:
pod_list = k8s_client.list_pod_for_all_namespaces(
field_selector=f'spec.nodeName={node.metadata.name}'
)
if not pod_list.items:
return
for pod in pod_list.items:
.ed"""" """$$$$be.
-" ^""**$$$e.
." '$$$c
/ "4$$b
d 3 $$$$
$ * .$$$$$$
.$ ^c $$$$$e$$$$$$$$.
d$L 4. 4$$$$$$$$$$$$$$b
$$$$b ^ceeeee. 4$$ECL.F*$$$$$$$
e$""=. $$$$P d$$$$F $ $$$$$$$$$- $$$$$$
@dharmab
dharmab / kubecon.md
Last active December 13, 2018 22:13

Kubecon 2018 Diary

bellamko@adobe.com / unfiltered / limited distribution

2018-12-11

Keynote

Nothing unexpected. That zoo story was weird.

Linux Systems Troubleshooting Crash Course

This document is a guide to Linux systems troubleshooting, with a slant towards CoreOS Container Linux.

Glossary

  • TCP: Transmission Control Protocol, a network protocol for reliable, error-checked in-order data transmission
  • UDP: User Datagram Protocol, a network protocol for unreliable low-latency data transmission
  • TLS: Transport Layer Security, an encryption protocol layered over TCP. Successor to SSL (Secure Sockets Layer).
  • container: A mechanism for isolating processes from the rest of the system and restricting the resources which processes can use.