Better HN
topnewbestaskshowjobs
Log inSign up

nodesocket

6,536 karma · joined Mar 10, 2011 (15y ago) · 4,329 submissions

Building a trading journal that helps investors log, tag, and review their trades and market insights with clarity. https://marketdiary.io

HN'er since 2011 when PG responded and was active.

Other companies: NodeSocket, Commando.io, Elastic Byte.

Living in Nashville, Tennessee. Charlie Munger "there are three ways to go broke... liquor, ladies and leverage."

  - GitHub: https://github.com/nodesocket
  - justin [at] HN-USERNAME {dot} com
Submissions

comment 1y ago · link · parent

I recently just created a NAT instance AMI (using Packer) for use on AWS based on Debian 12. The official AWS NAT instance AMI is horrendously outdated and based on end-of-life AWS Linux v1. At any rate, I was surprised to find it's incredibly easy to do using iptables. It's essentially just the following four iptables rules.

    sudo iptables -t nat -A POSTROUTING -o ens5 -j MASQUERADE
    sudo iptables -F FORWARD
    sudo iptables -A FORWARD -i ens5 -m state --state RELATED,ESTABLISHED -j ACCEPT
    sudo iptables -A FORWARD -o ens5 -j ACCEPT

    sudo iptables-save | sudo tee /etc/iptables/rules.v4 > /dev/null
Lastly a small change in sysctl to enable ipv4 forwarding:

    cat <<'EOF' | sudo tee /etc/sysctl.d/99-ip-forwarding.conf > /dev/null
    net.ipv4.ip_forward=1
    EOF

    sudo sysctl --system

comment 1y ago · link · parent

Very cool. How does Caine compare to Portainer? I assume Caine has much easier integrated git push deployment and CI/CD integration.

comment 1y ago · link · parent

What's the documentation site using and theme? Really like the look.

comment 1y ago · link · parent

I posted a link to s5cmd in the other post about s3mini. Really want to try it out migrating a few TBs of s3 data.

comment 1y ago · link · parent

Somewhat related, I just came across s5cmd[1] which is mainly focused on performance and fast upload/download and sync of s3 buckets.

> 32x faster than s3cmd and 12x faster than aws-cli. For downloads, s5cmd can saturate a 40Gbps link (~4.3 GB/s), whereas s3cmd and aws-cli can only reach 85 MB/s and 375 MB/s respectively.

[1] https://github.com/peak/s5cmd

comment 1y ago · link · parent

My biggest complaint as a loyal Apple consumer and perhaps maybe more importantly shareholder is… What happened to one more thing? Literally all their events are bland, lacking any explosive or gasps from the crowd. Same old, minor tweaks and dumb innovation such as genmoji. Honestly who’s coming up with this crap?

The last thing Apple did that actually got people excited and real innovation was apple silicon.

comment 1y ago · link · parent

Awesome, I literally just had this exact idea and started making a prototype with Cursor AI but gave up after about an hour going back and forth with AI not fixing bugs, or incorrectly implementing what I described. Fixing an issue, and then Cursor AI subsequently breaking it again.

Was going down the rabbit hole with TypeScript, React, and three.js.

comment 1y ago · link · parent

I’m a solo founder and sometimes outsource projects. How does that work if I pay a contractor a few thousand for a project? Are contractors allowed to be deducted fully at 100% expense?

comment 1y ago · link · parent

I run a Kubernetes 4x pi cluster and an Intel N150 mini PC both managed with Portainer in my homelab. The following open source ops tools have been a game changer. All tools below run in containers.

- kubetail: Kubernetes log viewer for the entire cluster. Deployments, pods, statefulsets. Installed via Helm chart. Really awesome.

- Dozzle: Docker container log viewing for the N150 mini pc which just runs docker not Kubernetes. Portainer manual install.

- UptimeKuma: Monitor and alerting for all servers, http/https endpoints, and even PostgreSQL. Portainer manual install.

- Beszel: Monitoring of server cpu, memory, disk, network and docker containers. Can be installed into Kubernetes via helm chart. Also installed manually via Portainer on the N150 mini pc.

- Semaphore UI: UI for running ansible playbooks. Support for scheduling as well. Portainer manual install.

comment 1y ago · link · parent

Awesome, will look at deploying fck-nat.dev. Love the name. So absurd AWS hasn’t updated their NAT instance AMI since 2018 and running Amazon Linux v1 which is end of life.

comment 1y ago · link · parent

Thanks, figured as much. AWS hasn't lowered the price of NAT gateways in (ever) I think. It's a bit absurd seeing as the dramatic price reduction of Graviton based instances and such. NAT gateways should be like 1/2 or 1/3 the current cost.

402.

Ask HN: Alternatives to NAT gateways for EC2 instances

6 points · by nodesocket · 1y ago · 7 comments

comment 1y ago · link · parent

As others have suggested, implement a captcha if you aren’t already. Implement Fingerprint.js and see if you can spot some patterns you can create firewall or application rules to block. Finally, not optimal but migrate off PayPal.

comment 1y ago · link · parent

Agree, I’m building a Flask based app and find using templates works well. Sure I have to know tailwind classes, but it’s not that hard to grok and putting the view layer into python seems like an unnecessary combination.

comment 1y ago · link · parent

I went back and forth deciding if I should use a service like auth0 / Clerk / Stack Auth for my Flask based app. Ultimately I decided on doing it myself. Storing users and organization in the SQLite db and using a Flask package like Flask-Login. I didn’t want to have to migrate to an ORM (SQLAlchemy) and needed a few basic constraints:

- Users can optionally be assigned to an organization but not required.

- Email address is globally unique.

- A user can only be associated to a single organization.

- 2FA support.

- Single-Sign-On support with Google, Facebook, and GitHub.

I have a feeling not using a framework or auth service is going to bite me in the butt down the line, but it just felt easier to roll my own implementation to start.

comment 1y ago · link · parent

Works fine for me. Are you blocking X?

comment 1y ago · link · parent

The official SpaceX stream is much higher quality with better camera angles and commentary in my opinion.

https://www.spacex.com/launches/mission/?missionId=starship-...

comment 1y ago · link · parent

This might already exist, but seems like AI would be a natural fit and efficient at recommending indexes based off queries. I’ve been building a Python SQLite3 app and I gave ChatGPT the entire schema along with all queries and it did a fantastic job at recommending queries and explaining them. Compound indexes, unique indexes, compound primary keys. Taken a step further, if a process ran live inspecting queries in real time and then sent notifications of missing indexes would be super useful.

comment 1y ago · link · parent

We’ve recently had some crazy storms and power outages and my Ecoflow units kicked in and worked perfectly. I have a River 2 which I use as a UPS for my Mac Mini + Monitor at my desk and a River 2 Pro as a UPS for all my Ubiquiti networking, Protect cameras, and severs in my racks. Then I have a Delta 2 I can hookup to the two Rivers to add additional charge. Just pulled the trigger on a 3600watt gas generator off Amazon as well incase of extended outages. While not whole home backup by any means it’s a solid setup for electronics and server gear.

comment 1y ago · link · parent

Is there a migration guide from stable to the branch 0.5? I’m running Litestream as a Docker sidecar alongside my Python app container and it’s been great and a nice comfort knowing my SQLite db is backed up to S3.

comment 1y ago · link · parent

This seems like a great alternative for Nano; though Nano is really good and just works.

comment 1y ago · link · parent

Is this the company behind xcp-ng? This looks like a completely different interface than XOA. First I’ve ever heard of Vates.

comment 1y ago · link · parent

Shoot, sorry completely messed this up. The correct url is: https://www.youtube.com/watch?v=1C7P-V05SgQ

comment 1y ago · link · parent

I learned a lot about obscure and often misunderstood BIOS settings. They are completely right, if you search forums people will willy nilly recommend BIOS changes but not understand the implications where changes cause worse performance or worse efficiency/thermals.

415.

Deep dive into BIOS settings with AMD engineers [video](youtube.com ↗)

3 points · by nodesocket · 1y ago · 3 comments

comment 1y ago · link · parent

I’ve been using Kubetail since the early days it was released in my homelab Kubernetes cluster. It’s fantastic and incredibly easy to setup and configure (unlike Loki + Grapha or ELk). Very polished.

comment 1y ago · link · parent

You don’t need cat at all for the restore. Can simply do:

sqlite3 data/database.db < “{backup_file}"

comment 1y ago · link · parent

I’ve been looking into a way to replicate a SQLite database and came across the LiteFS project by Fly.io. Seems like a solid drop-in solution backed by FUSE and Consul. Anybody used it in production? My use case is high availability between multiple VMs.
1
131415
145