• 4 Posts
  • 105 Comments
Joined 1 year ago
cake
Cake day: June 15th, 2023

help-circle
  • If there were a steady growing economy and no crazy events for the next 20 years, and no major health issues, my Roth 401k would probably be enough for a modest retirement.

    I was just wondering what the penalty would be to withdraw everything before 59, so I could figure out if it would be enough to immigrate somewhere with reasonable healthcare and a social safety net that would take those worries out of the equation. I think since it’s Roth it would just be 10% of gains + one-time capital gains tax?

    It might be enough. Simply having a lump of $ makes so many more countries welcome to immigrants.


  • seth@lemmy.worldtoTechnology@lemmy.worldMicrosoft Teams is dog shit
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    9 hours ago

    all default purple theme apps are dog shit, and there are a lot of them. any graphic designer who chooses purple needs to be prevented from designing anything ever. i have to see that fake color a third of my weekdays and it takes a full weekend of spending time outdoors and seeing green to recuperate.


  • Assuming you had the secrets stored in a secrets.json file in your home directory in this format:

    {
      "github": "github2FAsecretKey",
      "some_other_account": "2FAsecretKeyForSomeOtherAccount"
    }
    

    You could make a simple otp.py script and basic TOTP library to generate them in a script & copy them to clipboard:

    #!/usr/bin/env python3
    
    import json
    from pyotp import TOTP
    import os
    from sys import argv
    
    try:
      file = json.load(open(os.path.join('/home','username','secrets.json')))
      if len(argv) > 1:
        totp = TOTP(file[str(argv[1])])
        code = totp.now()
        cmd = 'cb cp $(echo %s | tr -d "\n")' % code
        os.system(cmd)
      else:
        print(f"Available args:\n  {'\n  '.join(list(file.keys()))}")
    except Exception as e:
      print(f'Error in OTP: {e}')
    

    Then you just alias otp='f() { $HOME/otp.py $1 };f' in your shell profile/rc and call it with e.g. otp some_other_account or just otp if you forget what key names you gave them to get a reminder list. Obviously you’d want to replace the JSON plaintext file load with an actual secret store if you’re not a lazy madman. I am a lazy madman.

    Edit: when I stop being lazy I will probably switch to that [email protected] suggestion below (pass + pass-otp extension).