Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)XT
Posts
10
Comments
82
Joined
1 yr. ago
Books @lemmy.ml
xtapa @discuss.tchncs.de

E-Reader recommendations

Hi,

My Kindle won't boot anymore and keeps getting stuck in boot screen, so I thought this might be a good time to get away from Amazon, even though that device was great.

So, what non-kindle readers would you recommend?

It should have color and background light and it shouldn't be huge so I can keep it in the back pocket.

And, since I don't have any experience outside the Amazon ecosystem: how is the experience of buying and transferring books to non Kindle readers?

Update: I did research based on your recommendations. Thanks for all the input, that was way more than I expected! I settled for the Kobo Clara Color since it seemed to almost perfectly match my needs and Kobo and the model itself got heavily recommended here and on the web.

  • Tut mir leid, Japan-Fanboys und -Girls.

    Tabi (jap. 足袋) sind eine Art von knöchelhohen japanischen Socken mit abgeteiltem großem Zeh.

    Sie werden üblicherweise zu Zōri oder Geta (beides Sandalen) getragen.

    Quelle: Wikipedia

    Tabi (Socken) 足袋 Traditionelle Socken bestehen meist aus weißem, festem Baumwollstoff mit abgeteiltem großen Zeh.

    Zôri 草履 (Sandalen) Zôri-Sandalen gehören zum Kimono

    Quelle: Deutsch-Japanische Gesellschaft München

    Es SIND Socken in Sandalen.

  • I personally try to avoid deeply nested if/else. Or else in general, because I think it makes code more readable. Especially when one of the branches is just an exit condition.

     undefined
        
    if exitCondition {
        return false
    }
    // long ass code execution
    
      

    is way more readable than

     undefined
        
    if !exitCondition {
        // long ass code execution
    } else {
       return false
    }
    
      

    In a loop, you can just return the value instead of passing it to a "retVal" variable.

    With those in mind, you could refactor HasPermissions to

     undefined
        
    func (r *RBAC) HasPermission(assignedRoles []string, requiredPermission string, visited map[string]bool) bool {
        for _, assigned := range assignedRoles {
            if visited[assigned] {
                continue
            }
            role, ok := r.Roles[assigned]
            if !ok {
                //role does not exist, so skip it
                continue
            }
            for _, permission := range role.Permissions {
                if permission.String() == requiredPermission {
                    //Permission has been found! Set permitted to true and bust out of the loop
                    return true
                }
            }
            //check inherited roles
            if permitted := r.HasPermission(role.Inherits, requiredPermission, visited); permitted {
                return true
            }
        }
        return false
    }
    
      

    The same could be applied to LoadJSONFile and I think that really would approve the readability and maintainability of your code.

    edit: This refactor is not tested

  • I like the question.

    I had to think of two songs immediately:

    Coldplay - Magic. I really feel the lyrics but the "of course I do" at the end always leaves me in tears.

    Daft Punk - Touch. I always interpret the song as a robot struggling to become sentient, but it also reminds me of my process of leaving behind my angry and frustrated teen and early twenties self because I realized that it made me unhappy.

  • Linux @lemmy.ml
    xtapa @discuss.tchncs.de

    Xbox Controller Connection Issues

    cross-posted from: https://discuss.tchncs.de/post/27742447

    Hi folks,

    I got a new Xbox Series X Controller (Model 1914). I had Xbox One controller before.

    With xpadneo installed I had basically no problems running my xbox one controller. It connected via BT with no issues and workes in games really well wired and wireless.

    The new controller on the other hand, works really well via cable, but does not connect via BT. I can find it, I can pair it, but I cannot connect to it.

    xpadneo readme says Series X needs a BT stick with BLE so I bought one, but that did not solve the problem (I'm not sure if BLE needs to be activated or how to do it rn).

    Linux Gaming @lemmy.ml
    xtapa @discuss.tchncs.de

    Xbox Controller Connection Issues

    Hi folks,

    I got a new Xbox Series X Controller (Model 1914). I had Xbox One controller before.

    With xpadneo installed I had basically no problems running my xbox one controller. It connected via BT with no issues and workes in games really well wired and wireless.

    The new controller on the other hand, works really well via cable, but does not connect via BT. I can find it, I can pair it, but I cannot connect to it.

    xpadneo readme says Series X needs a BT stick with BLE so I bought one, but that did not solve the problem (I'm not sure if BLE needs to be activated or how to do it rn).

  • If you ever need help with language concepts, just ask ChatGPT. It has some good definitions and examples for you. This will help you in a language based environment like Lemmy. 👍

  • Linux @lemmy.ml
    xtapa @discuss.tchncs.de

    Pro Linux hacking

    Found some very special "make it look hacky" bash in criminal minds.

    Linux @programming.dev
    xtapa @discuss.tchncs.de

    Why is my tmux borked?

    cross-posted from: https://discuss.tchncs.de/post/20478370

    cross-posted from: https://discuss.tchncs.de/post/20474285

    I've been trying tmux and followed a video that showcases and offers a prebuilt config for styling and plugins. Something happended (guess I did something wrong?) the styling broke and I decided I'll go bare bones and customize to my needs when needed instead of using preconfigured stuff. I deleted all configs and caches I could find with fzf and even reinstalled tmux, but still some broken styling is present and makes it unpleasent to work with. Some of my configs seem to be present even after uninstall, as the prefix is still C-Space instead of the default. There are some oh-my-zsh subfolders that contain tmux. I don't know if those have been there before and I also don't know, if I can delete them without breaking the next thing.

    I'm on a MacBook and installed tmux via brew.

    Programming @programming.dev
    xtapa @discuss.tchncs.de

    Why is my tmux borked?

    I've been trying tmux and followed a video that showcases and offers a prebuilt config for styling and plugins. Something happended (guess I did something wrong?) the styling broke and I decided I'll go bare bones and customize to my needs when needed instead of using preconfigured stuff. I deleted all configs and caches I could find with fzf and even reinstalled tmux, but still some broken styling is present and makes it unpleasent to work with. Some of my configs seem to be present even after uninstall, as the prefix is still C-Space instead of the default. There are some oh-my-zsh subfolders that contain tmux. I don't know if those have been there before and I also don't know, if I can delete them without breaking the next thing.

    I'm on a MacBook and installed tmux via brew.

    Logseq @lemmy.ml
    xtapa @discuss.tchncs.de

    Mouse "back" and "forward" buttons not working

    Hi, I just started using Logseq via the Mac desktop app. My Mouse is a Logi M720 Triathlon with thumb buttons set to default settings with Forward (Forward button) and Back (Back button). Those work just fine everywhere. IDEs, text editors, Obsidian, browsers etc. But in Logseq, the buttons do nothing and it kinda breaks my flow because I have to switch to keyboard for weird shortcuts or have to klick the back button manually. Is there a way ti fix this? I could not find a working fix yet.

    Linux @lemmy.ml
    xtapa @discuss.tchncs.de

    Updates and Dependency Hell

    Hi,

    I'm in the weird spot again, where I want to update my Tumbleweed system and am lost in a dependency hell. It more or less occurs once in a while when updates drop and the prompt asks if I want to install stuff from vendor "obs://build.opensuse.org/home:wolfi323" replacing the obsolete stuff from the official openSUSE vendor.

    As soon as I read wolfi323, I get fucking Vietnam flashbacks, because it means I will have to decide for ~100 services if I keep the current obsolote version or install the one from wolfi323. Either way, it's gonna fuck up a myriad of dependencies.

    All that hassle just to do the same shit all over again because at some point, the official opensuse repos catch up with newer versions.

    I could probably wait for the official updates, but it's uncertain, when they are going to drop and I'll just pile up thousands of updates in the meantime.

    How do the Tumbleweed Folks among us deal with this?

    Linux @lemmy.ml
    xtapa @discuss.tchncs.de

    Latte-Dock gone in zypper and local?

    Hello, I just startet up my PC and Latte-Dock seems to be gone, not only my local installation, but also the package from zypper. Does someone know whats happening here?

    Linux @programming.dev
    xtapa @discuss.tchncs.de

    Move installed packages with zypper

    I just noticed, that my SSD is almost full and I think it is because of all the zypper packages I got installed. I've got another ~100gb SSD thats just for stuff (mounted unter "Misc" says it all) and would like to move some (or all?) of the packages like vscode, podman or other stuff on that second SSD. Is there a way to do that with zypper without removing and installing them again under the new path?