a couple of prompts of claude code gave me this, works well enough, but while I agree that this is sometimes useful, it may indeed better served by a couple of aliases in the terminal
```
#!/bin/bash
# SwiftBar Port Monitor
# Monitors processes on TCP ports 2000-6000
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
It's a backpack. You hang it on the hook on the stall door where you hang your jacket
I think there is less of a likelihood someone is going to jump you for your backpack when you are at a restaurant for lunch than there is for them breaking into a car parked only a dimly lit street for said backpack.
Except that American public toilets have gaps so large between the door and the frame that a thief can pretty much just grab the backpack without opening the door =)
I live in big City America. This is what I did. Hang my backpack on the stall hook as stated or shit with it on my lap. I carried a laptop, DSLR and lens with me for all my college life. I couldn't afford to replace anything if lost during said times as an international student whose credits cost more than 3 times that of a non-international student.
I can’t tell if you’re being sarcastic or not, but generally car break-ins are much more frequent than muggings. And bringing a bag of expensive equipment into the bathroom is almost certainly less risky than leaving it somewhere, whether in your car or elsewhere.
I think he published this video when I was starting to think about the same things, especially about working out, where it's more important to workout consistently with a decent form/weight than to spend hours reading up science and working out very little.
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
You mentioned electron so I suspect you're interested in games playable via browser, in that case these two come to my mind in the javascript/typescript ecosystem:
React native and flutter are very, very different from a PWA.
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
They're not web-based under the hood, but the code that the developer writes to drive them is very much in the ballpark of a web developer - JS, React, TS, Webpack, etc. That's why they're classified as "web-based" or "web hybrid" rather than "native".
# 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/.://')
done <<< "$processes"# Refresh option echo "---" echo "Refresh | refresh=true