akash_rawal

@akash_rawal@lemmy.world

This profile is from a federated server and may be incomplete. Browse more on the original instance.

akash_rawal,

Replacing “Programmers:” with “Program:” is more accurate.

spoilerTower of Hanoi is actually easy to write program for. Executing it on the other hand…

akash_rawal,

I didn’t know the answer either, but usually you can compose solution from solutions of smaller problems.

solution(0): There are no disks. Nothing to do. solution(n): Let’s see if I can use solution(n-1) here. I’ll use solution(n-1) to move all but last disk A->B, just need to rename the pins. Then move the largest disk A->C. Then use solution(n-1) to move disks B->C by renaming the pins. There we go, we have a stack based solution running in exponential time.

It’s one of the easiest problem in algorithm design, but running the solution by hand would give you a PTSD.

What're some of the dumbest things you've done to yourself in Linux?

I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers....

akash_rawal,
akash_rawal,

How I lost a Postgres database:

  1. Installed Postgres container without configuring a volume
  2. Made a mental note that I need to configure a volume
  3. After a few days of usage, restarted the container to configure the volume
  4. Acceptance
akash_rawal,

Technically, containers always run in Linux. (Even on windows/OS X; on those platforms docker runs a lightweight Linux VM that then runs your containers.)

And I wasn’t even using Docker.

Indian Government to block ProtonMail after bomb threats were sent using a ProtonMail account (timesofindia.indiatimes.com)

The IT ministry has reportedly decided to issue an order blocking end-to-end encrypted email service ProtonMail. According to a report in Hindustan Times, the government is planning to block the email service at the request of the Tamil Nadu police over a hoax bomb threat sent to at least thirteen private schools in Chennai on...

akash_rawal,

They never will, we have to vote them out.

akash_rawal,

I don’t know either, but from what I know, bureaucracy and corruption is often a result of bad organizational structure. Some “designated officer” raises a finger which gets approved by the Secretary who is appointed by the minister who is appointed by the PM who is nominated by the Lok Sabha, and we lose yet another privacy protecting service. I think we should have more direct control in these matters.

For now, if we cannot expect a proper functioning web, they cannot expect stability under their seats. Vote them out.

akash_rawal, (edited )

Just did some basic testing on broadcast addresses using socat, broadcast is not working at all with /32 addresses. With /24 addresses, broadcast only reaches nodes that share a subnet. Nodes that don’t share the subnet aren’t reachable by broadcast even when they’re reachable via unicast.

Edit1: Did more testing, it seems like broadcast traffic ignores routing tables.

On 192.168.0.2, I am running socat -u udp-recv:8000,reuseaddr - to print UDP messages.

Case 1: add 192.168.0.1/24


<span style="color:#323232;"># ip addr add 192.168.0.1/24 dev eth0
</span><span style="color:#323232;"># # Testing unicast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.2:8000 &lt;&lt;&lt; "Message"
</span><span style="color:#323232;"># # Worked
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.255:8000,broadcast &lt;&lt;&lt; "Message"
</span><span style="color:#323232;"># # Worked
</span>

Case 2: Same as above but delete 192.168.0.0/24 route


<span style="color:#323232;"># ip addr add 192.168.0.1/24 dev eth0
</span><span style="color:#323232;"># ip route del 192.168.0.0/24 dev eth0
</span><span style="color:#323232;"># # Testing unicast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.2:8000 &lt;&lt;&lt; "Message"
</span><span style="color:#323232;">2024/02/13 22:00:23 socat[90844] E sendto(5, 0x5d3cdaa2b000, 8, 0, AF=2 192.168.0.2:8000, 16): Network is unreachable
</span><span style="color:#323232;"># # Testing broadcast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.255:8000,broadcast &lt;&lt;&lt; "Message"
</span><span style="color:#323232;"># # Worked
</span>
akash_rawal,

Here is a trick that has been tried and tested over the years: Install another distro, and use that to install Arch. This way, you can rely on an already working linux distro till your Arch install works the way you want.

akash_rawal,

I was confused for a moment, because intuitively a CPU fan would look in the same direction as it blows air, so it should look into the heatsink. The fan looking away from the heatsink seems weird to me.

Or the owner installed the fan in the wrong direction.

akash_rawal,

Hmm… Maybe I should adjust my priorities. https://i.imgflip.com/8eri0b.jpg

akash_rawal,

1 a : to propel oneself in water by natural means (such as movements of the limbs, fins, or tail) b : to play in the water (as at a beach or swimming pool) 2 : to move with a motion like that of swimming : glide a cloud swam slowly across the moon 3 a : to float on a liquid : not sink b : to surmount difficulties : not go under sink or swim, live or die, survive or perish— Daniel Webster 4 : to become immersed in or flooded with or as if with a liquid potatoes swimming in gravy 5 : to have a floating or reeling appearance or sensation

www.merriam-webster.com/dictionary/swim

Apparently, swimming inherently requires a liquid.

akash_rawal,

TPM stores the encryption key against secure boot. That way, if attacker disables/alters secure boot then TPM won’t unseal the key. I use clevis to decrypt the drive.

Should I move to Docker?

I’m a retired Unix admin. It was my job from the early '90s until the mid '10s. I’ve kept somewhat current ever since by running various machines at home. So far I’ve managed to avoid using Docker at home even though I have a decent understanding of how it works - I stopped being a sysadmin in the mid '10s, I still worked...

akash_rawal,

As someone who is operating kubernetes for 2 years in my home server, using containers is much more maintainable compared to installing everything directly on the server.

I tried using docker-compose first to manage my services. It works well for 2-3 services, but as the number of services grew they started to interfere with each other, at that point I switched to kubernetes.

akash_rawal,

If one service needs to connect to another service then I have to add a shared network between them. In that case, the services essentially shared a common namespace regarding DNS. DNS resolution would routinely leak from one service to another and cause outages, e.g if I connect Gitlab container and Redmine container with OpenLDAP container then sometimes Redmine’s nginx container would access Gitlab container instead of Redmine container and Gitlab container would access Redmine’s DB instead of its own DB.

I maintained some workarounds, like starting Gitlab after starting Redmine would work fine but starting them other way round would have this issue. But switching to Kubernetes and replacing the cross-service connections with network policies solved the issue for me.

akash_rawal,

I was writing my own compose files, but see my response to a sibling comment for the issue I had.

akash_rawal,

don’t create one network with Gitlab, Redmine and OpenLDAP - do two, one with Gitlab and OpenLDAP, and one with Redmine and OpenLDAP.

This was the setup I had, but now I am already using kubernetes with no intention to switch back.

akash_rawal,

Thank you… I had to learn kubernetes for work and it was around 2 weeks of time investment and then I figured out I could use it to fix my docker-compose pains at home.

If you run a lot of services, I can attest that kubernetes is definitely not overkill, it is a good tool for managing complexity. I have 8 services on a single-node kubernetes and I like how I can manage configuration for each service independent of each other and also the underlying infrastructure.

akash_rawal,

Nothing will ever top “Galaxy Note 7”. Super fun in planes, especially if they’re flying.

akash_rawal,

You have rust.

You get a horse and arrive at the castle within seconds but the horse is too old and doesn’t work with the castle.

You remove the horse, destructure the castle and rescue the princess within seconds, but now you have no horse.

While you’re finding a compatible horse and thinking whether you should write your own horse, Bowser recaptures the princess and moves her to another castle.

akash_rawal,

I run a crude automation on top of OpenSSL CA. It checks for certain labels attached to kubernetes services. Based on that it creates kubernetes secrets containing the generated certificates.

akash_rawal,

I just uploaded to Github: github.com/akashrawal/nsd4k

I only made it for myself, so expect very rough edges in there.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • osvaldo12
  • mdbf
  • Youngstown
  • cisconetworking
  • slotface
  • rosin
  • thenastyranch
  • ngwrru68w68
  • khanakhh
  • megavids
  • ethstaker
  • tacticalgear
  • modclub
  • cubers
  • Leos
  • everett
  • GTA5RPClips
  • Durango
  • anitta
  • normalnudes
  • provamag3
  • tester
  • lostlight
  • All magazines