linux
Linux 2mo ago
Jump
How to quit VIM?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    2mo ago 100%

    You have to practice switching between neovim and other editors.

    You have forgotten how to use a normal editor. I am not making it up, it is a real phenomenon. Similar to when SmarterEveryDay learned to ride a backwards bicycle he forgot how to ride a normal bicycle and essentially had to re-learn it. You have to re-learn how to use a normal editor.

    1
  • Self terminating container images for real world dependencies to support your unit tests
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    2mo ago 100%

    I don't get it, how would a database container run your unit tests? And unless you know some secret option to stop the database after, say, it is idle for a few seconds, it will continue running.

    The purpose is to test database dependent code by spinning up a real database and run your code against that.

    4
  • Confused about Podman
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    3mo ago 100%

    For me the value of podman is how easily it works without root. Just install and run, no need for sudo or adding myself to docker group.

    I use it for testing and dev work, not for running any services.

    6
  • linux
    Linux 3mo ago
    Jump
    I got average monthly ratings for games on Wine AppDB, and seems like something happened in 2016.
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    3mo ago 100%

    Yes it is the ratings on winehq, https://appdb.winehq.org/

    And yes, an average user probably going to fire a game, figure out it is not working, and promptly go back to windows, which makes that data less accurate, but what can we do about it?

    1
  • linux
    Linux 3mo ago
    Jump
    I got average monthly ratings for games on Wine AppDB, and seems like something happened in 2016.
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    3mo ago 100%

    The left axis is total number of ratings of each type (Garbage, Bronze, Silver, Gold, Platinum) in a given month (not per app). For example for month 2016-07 there were

      "Garbage" => 22
      "Bronze" => 14
      "Silver" => 13
      "Gold" => 55
      "Platinum" => 61
    

    On right side is the average rating. So if I assign values to each rating:

      "Garbage" => 1
      "Bronze" => 2
      "Silver" => 3
      "Gold" => 4
      "Platinum" => 5
    

    I can get an average rating, which will be between 1 to 5.

    ((22*1) + (14*2) + (13*3) + (55*4) + (61*5)) / (22 + 14 + 13 + 55 + 61)
     ~=  3.721
    
    3
  • I took each rating for games on Wine Application Database, mapped them to numbers (Garbage -> 1, Bronze -> 2, Silver -> 3, Gold -> 4, Platinum -> 5) and plotted a monthly average.

    115
    33
    Testing a routing protocol using network namespaces
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    5mo ago 100%

    That advertisement would be interpreted as Node C's advertisement.

    The plan is to treat public keys as node's identity and trust mechanism similar to OpenPGP (e.g. include any node key signed by a master key as a cluster member)

    Right now, none of the encryption part is done and it is not a priority right now. I need to first implement transitive node detection, actually forward packets between nodes, some way to store and manage routes, and then trust and encryption mechanisms before I'd dare to test this stuff on a real network.

    1
  • That Nim Flashbacks
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    6mo ago 100%

    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.

    7
  • That Nim Flashbacks
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    6mo ago 100%

    Replacing "Programmers:" with "Program:" is more accurate.

    ::: spoiler spoiler Tower of Hanoi is actually easy to write program for. Executing it on the other hand... :::

    19
  • linux
    Linux 6mo ago
    Jump
    What're some of the dumbest things you've done to yourself in Linux?
  • "Initials" by "Florian Körner", licensed under "CC0 1.0". / Remix of the original. - Created with dicebear.comInitialsFlorian Körnerhttps://github.com/dicebear/dicebearAK
    akash_rawal
    6mo ago 100%

    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.

    4
  • I was exploring direct links between machines, and basically failed to break something. I assigned IP address `192.168.0.1/24` to `eth0` in two ways. A. Adding `192.168.0.1/24` as usual ``` # ip addr add 192.168.0.1/24 dev eth0 # ping -c 1 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.051 ms --- 192.168.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.051/0.051/0.051/0.000 ms # ``` B: Adding `192.168.0.1/32` and adding a /24 route ``` # ip addr add 192.168.0.1/32 dev eth0 # # 192.168.0.2 should not be reachable. # ping -c 1 192.168.0.2 ping: connect: Network is unreachable # # But after adding a route, it is. # ip route add 192.168.0.0/24 dev eth0 # ping -c 1 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.053 ms --- 192.168.0.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.053/0.053/0.053/0.000 ms # ``` Does this mean that adding an IP address with prefix is just a shorthand for adding the IP address with /32 prefix and adding a route afterwards? That is, does the prefix length has no meaning and the real work is done by the route entries? Or is there any functional difference between the two methods? Here is another case, these two nodes can reach each other via direct connection (no router in between) but don't share a subnet. Node 1: ``` # ip addr add 192.168.0.1/24 dev eth0 # ip route add 192.168.1.0/24 dev eth0 # # Finish the config on Node B # nc 192.168.1.1 8080 <<< "Message from 192.168.0.1" Response from 192.168.1.1 ``` Node 2: ``` # ip addr add 192.168.1.1/24 dev eth0 # ip route add 192.168.0.0/24 dev eth0 # # Finish the config on Node A # nc -l 0.0.0.0 8080 <<< "Response from 192.168.1.1" Message from 192.168.0.1 ```

    45
    20

    I am building my personal private cloud. I am considering using second hand dell optiplexes as worker nodes, but they only have 1 NIC and I'd need a contraption like this for my redundant network. Then this wish came to my mind. Theoretically, such a one box solution could be faster than gigabit too.

    69
    34

    Let alone including yourself in the picture. I know how you look like. Let alone including your loved ones in the picture. Even when their disappointment of having to face away from the monument is clearly visible in the photo. And then you make them do stuff like 'hold the sun in your hands' or whatever.

    80
    40