• 1 Post
  • 49 Comments
Joined 1 year ago
cake
Cake day: June 28th, 2023

help-circle





  • Oscar@programming.devtoLinux@programming.devWhy is my tmux borked?
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    3 months ago

    Maybe it’s still using the borked config because all sessions were not exited? Try exiting it and then make sure no tmux process is still running, by for example running ps -aux | grep tmux.

    Otherwise there must be some tmux config still lying around in your $HOME.

    Edit: I don’t know anything about Macs so I’m just assuming it works similar to linux.

    Does fzf search hidden folders? You could also try with this, to make extra sure: find $HOME -name "*tmux*".


  • Oscar@programming.devtoProgrammer Humor@programming.devBrace Style
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 months ago

    Linux uses 8 spaces. Excerpt from the official style guide:

    Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic movements that try to make indentations 4 (or even 2!) characters deep, and that is akin to trying to define the value of PI to be 3.

    Rationale: The whole idea behind indentation is to clearly define where a block of control starts and ends. Especially when you’ve been looking at your screen for 20 straight hours, you’ll find it a lot easier to see how the indentation works if you have large indentations.

    Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.

    In short, 8-char indents make things easier to read, and have the added benefit of warning you when you’re nesting your functions too deep. Heed that warning.

    The reasoning seems sound, but I still prefer 4 personally.



  • Oscar@programming.devtoProgramming@programming.devRedis is no longer OSS
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    2
    ·
    8 months ago

    By the same argument, wouldn’t GPL and other copyleft licenses be considered non-free as well since you are not free to do whatever you want with the source? For example, incorporating it into a proprietary project, refusing to provide the source to users upon request, or not disclosing attribution, etc. The latter would even go against the terms of permissive licenses.

    Clearly defining what free, and by extension FOSS, means is very relevant.





  • It’s when you open a publicly facing port and map (forward) it to a local port your machine. In this case, it’s opened at the vpn provider’s public gateway. Otherwise, it would typically be opened in your router instead.

    You can then configure your torrent client to listen on that local port that the public port is forwarded to. I think generally the public and the local port are the same number when using VPN.

    If you do that, then others have the ability to initiate a connection to you instead of only you being able to initiate the connection to somebody else.

    When seeding/leeching to/from someone else, at least one of you needs a port open. So, if you always have one open, you allow yourself to connect to anyone on the network regardless if they have one open or not.

    Sorry if I confused you more, I’m not that great at explaining.