Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net">
<diagram name="K8s Cluster">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- Cluster Group -->
<mxCell id="cluster" value="Kubernetes Cluster (SLES)" style="group" parent="1">
<mxGeometry x="20" y="20" width="1150" height="760" as="geometry"/>
@Schlump
Schlump / awslogzf
Created September 20, 2022 12:15 — forked from arashilmg/awslogzf
AWSLogs fuzzyfinder (realtime and past)
function awslogzf() {
local PROFILE=`cat ~/.aws/credentials | egrep "\[" | sed "s/\[\(.*\)\]/\1/" | fzf `;
local GROUP=`awslogs groups --profile $PROFILE | fzf `;
local SELECTTIEM=`echo -e "realtime\npast" | fzf +m`;
if [[ $SELECTTIEM == "realtime" ]]; then
local TIMESPAN="-w" ;
else
local MINSAGO=$(for i in `seq 10 10 10080`; do echo $i "->" $(date -d -${i}min) ; done | fzf --prompt="10minutes from: "| tr "\t" " " | tr -s " " | cut -d " " -f1 | sort -n | sed -e 1b -e '$!d');
local FROM=`echo $MINSAGO | cut -d " " -f2 `
local TILL=`echo $MINSAGO | cut -d " " -f1 `
export PS1="[\t] \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;46m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;46m\]\h\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \w \[$(tput sgr0)\]"
@Schlump
Schlump / routing.py
Last active September 2, 2017 15:30
Routes Point data from Start to endpoint using OpenSourceRoutingMachine using Geopandas
#!/usr/bin/python
import requests
import numpy as np
import pandas as pd
import geopandas as gpd
from shapely.geometry import LineString
def route(df, latS, longS, latE, longE, service='route', profile='driving'):
"""
Routes from Start to endpoint using OpenSourceRoutingMachine.