• 0 Posts
  • 17 Comments
Joined 1 year ago
cake
Cake day: June 2nd, 2023

help-circle










  • You’ll want to learn the difference between SAS and SATA connectors. You can very probably use either. 3.5 inch is the “standard” size, while 2.5 inch was more popular for laptops. However, in the interest of density, servers started accepting 2.5 inch drives to fit more drives per rack.

    You can get great deals on used sas drives on ebay, but if you don’t know how to monitor s.m.a.r.t. data / rebuild a zfs array, that can be very very risky. You need to be able to survive concurrent disk failures.

    Honestly your best bet is brand new western digital or seagate drives. Buy them on amazon, but double check that the seller is legit. That’s it.


  • Networking is super simple - or at least it started out like that. Then we ran out of numbers, and had to invent nat. Then we invented ipv6, which has lots of numbers, but is unfathomably complicated.

    I recommend learning about NAT / network address translation. NAT is not a stateful firewall, but acts kinda like one.

    You can understand a stateful firewall by understanding the tcp handshake. TCP is hugely important. Don’t worry about fin_wait_2 and that nonsense, just get syn/synack/ack down.

    People will brush off udp because it’s easier, but it’s also important.

    Once you get NAT/stateful firewalls, I would look into wireguard. That’s the protocol underneath tailscale. Know that it wraps your tcp packets in an encrypted udp datagram. Then find out how tailscale sets up your wireguard connections without port forwarding - or don’t, as webrtc-style signaling is famously impossibly complicated.

    Here’s what you should do - spin up all the services you want, but put them behind an nginx reverse proxy. Then put that behind a WAF. Getting those layers aligned will teach you a huge amount of useful stuff.

    In general, don’t worry about hackers unless exposing a port to the internet. Then worry. Your router’s stateful firewall will do a good job until you poke holes in it.

    If you want a cool side project, listen on port 20 and dump the characters that the web scanners send to you. If they don’t send anything, send a username prompt after the tcp handshake - the robots will give you the login creds that they try against weak boxes :)





  • Any form of bread with a filling, generally assembled cold

    But, dare I say, does that not make a ravioli a sandwich? A poptart? Mayhaps even … Lasagna?

    Ah, you proclaim! But those are cooked further!

    But so too is a grilled cheese! And a patty melt!

    Where will the madness end?


  • Of course!

    In other words though, for those just starting their monad journey:

    An endofunctor is a box. If you have a box of soup, and a function to turn soup into nuts, you can probably turn the box of soup into a box of nuts. You don’t have to write a new function for this, if the box can take your existing function and “apply” it to its contents.

    Arrays are endofunctors, because they hold things, and you can use Array.map to turn an array of X into an array of Y.

    Monoids are things you can add together. Integer plus integer equals integer, so ints are monoids. String plus string (concatenation) equals a longer string, so strings are monoids. Grocery lists are monoids.

    Arrays are monoids!

    Arrays are both endofunctors and monoids, so for everyone except category theory purists, they are monads.

    Javascript promises hold things, and you can transform their contents with .then - so they are endofunctors. You can “add them together” with Promise.all (returning a new promise), so they are monoids. They are both monoids and endofunctors, so they are monads.

    I’ve just upset all the category theorists, but in the context of programming, that’s all it is. It’s surprisingly simple once you get it, it’s just complicated names for simple features.