• 1 Post
  • 38 Comments
Joined 9 months ago
cake
Cake day: October 1st, 2023

help-circle


  • I got it working in shell as well:

    #!/bin/bash
    
    read -p "Username: " user
    read -p "Password: " -s pass
    read -p "TOTP: " totp
    
    res=$(curl \
        --request POST \
        --url "https://feddit.ch/api/v3/user/login" \
        --header 'accept: application/json' \
        --header 'content-type: application/json' \
        --data '{"username_or_email":"'$user'","password":"'$pass'","totp_2fa_token":"'$totp'"}')
    
    jwt=$(echo $res | sed -re 's/^.*"jwt":"([^"]*)".*$/\1/')
    
    curl \
        --request GET \
        --url "https://feddit.ch/api/v3/user/export_settings" \
        --header 'accept: application/json' \
        --cookie "jwt=$jwt" \
        -o "export.json"
    

    I’d recommend echoing $res and $jwt before processing them further

    Edit: if you don’t have TOTP enabled, don’t forget to remove it from the request

    Docs: https://lemmy.readme.io/reference/post_user-login

    Edit 2: added spacing




  • malijaffri@feddit.chtoPixel Dungeon@lemmy.worldWhat are the odds?
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    4 months ago

    I have never encountered any double boss before in all my years playing PD*! And that’s actually saying something, because I play Shattered quite often. So, in my inexpert opinion, pretty darn small!

    * limited to Vanilla, Shattered, and Experienced. Also bits of Yet Another, for a little while about a year ago.



  • PARIS, Feb 26 (Reuters) - France’s President Emmanuel Macron said on Monday there was no consensus on sending troops to Ukraine, but the subject could not be ruled out.

    “There is no consensus at this stage… to send troops on the ground,” Macron said after hosting some 20 countries allied to Ukraine.

    “Nothing should be excluded. We will do everything that we must so that Russia does not win.”


    Saved you a click. Yes, that’s it. That’s the entire “article”. A total of 4 sentences. What exactly was the point of writing such a short article?

    Edit: pulled my head out of my ass.








  • After going through the paper, it’s not just “alien plant with eyes”, but rather “alien mimic plant with eyes”! This plant “sees” other plants around (above?) itself and changes the shape of its own leaves to match those of the other plant.

    I wonder if the effect can be chained, and if so, how long the chain could be? I’m imagining an alien mimic plant with eyes mimicking an alien mimic plant with eyes mimicking an alien mimic plant with eyes mimicking the first alien mimic plant with eyes.




  • Piggybacking onto this to mention my go-to online RegEx editor: RegExr. It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this).



  • I agree with this completely! I am also not generally a fan of such gatekeeping, but in cases like these I feel that it is not just justified, but rather necessary.

    I once asked the admin and … a defederation of such instances is not seen as an action to take.

    Could you please rephrase? Not sure I understand this properly. What I think I understand is that the instance admin is not a big fan of defederation. Is that correct?