npretto
# SwiftBar Port Monitor # Monitors processes on TCP ports 2000-6000
# Menu bar title echo " Ports" echo "---"
# Get processes listening on TCP ports 2000-6000 processes=$(lsof -iTCP:2000-6000 -sTCP:LISTEN -n -P 2>/dev/null | awk 'NR>1 {print $2 "|" $1 "|" $9}' | sort -t'|' -k3 -n)
if [ -z "$processes" ]; then echo "No processes found on ports 2000-6000" exit 0 fi
# Process each line while IFS='|' read -r pid name port_info; do if [ -n "$pid" ] && [ -n "$name" ] && [ -n "$port_info" ]; then # Extract port number from format like :3000 port=$(echo "$port_info" | sed 's/.://')
# Menu item with port and process name
echo "[$port] $name | color=blue"
# Submenu items
echo "--Kill (TERM) | shell=kill param1=$pid terminal=false refresh=true"
echo "--Kill Force (KILL) | shell=kill param1=-9 param2=$pid terminal=false refresh=true"
echo "--Process Info | shell=ps param1=-p param2=$pid param3=-o param4=pid,ppid,user,command terminal=true"
echo "-----"
fi
done <<< "$processes"# Refresh option echo "---" echo "Refresh | refresh=true
Be good-argument-driven, not data-driven
Most "benchmarks" or data that we have mean very little because of the context (or lack of) they are done.
I often read critics to benchmarks in here and how they are not "real life scenarios", seems like CS is not the only world where this happens
Cooking internet and lifting internet have the same problem
While a PWA is a web app, react-native renders actual native components, and flutter has its own rendering engine. I wouldn't call them "web-based" tech
When the button is in a corner the size is virtually infinite (we can move the mouse all we want in one direction and we'd still be over the button)
To be honest, obsidian not being open source doesn't bother me too much, what is important to me is that I own the data and that it is in a fairly common format so i can move it to another software in 10 years. An open source software with a weird binary format to save the data will probably do more harm in the long term
Godot Engine receiving a new grant from Meta's Reality Labs
I made this little interactive playground for various pathfinding algorithms showing how they can be seen as a general algorithm with different a different queue and different heuristic in use.
The readme has some theory but the cool thing is the link to the app on netlify where you can experiment moving the positions of start, goal and of the obstacles.
If you're interested I'd suggest you keep the readme open while toying with the app, as the readme has more theory.