• 3 Posts
  • 386 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle


  • Ok let me break it down with crayons because apparently y’all don’t understand that multiple things can be true at the same time:

    1. Sovcit in OP is stupid, annoying, and wrong.
    2. Cops in the US are aggressive, violent, and love to escalate
    3. We don’t have an accurate account of what happened

    Given the above, maybe we don’t have to give the cops the benefit of the doubt and assume that whatever they did to him was necessary and justified?

    The only good guys in this story are the kids, who were probably traumatized by the experience.







  • Grim, slurp, tesseract, and apparently the deepl SDK for Ruby? That was an interesting choice, younger me.

    #! /bin/zsh
    # Select an area of the screen, Screenhot, OCR, and translate it to english.
    
    temp_image=$(mktemp --suffix '.png')
    grim -g "$(slurp)" "$temp_image"
    
    # DPI of 120 seems to work OK for screenshots.
    source_text=$(tesseract "$temp_image" - --dpi 120 -l pol+deu) 
    
    translated_text=$(~/scripts/translate "$source_text")
    
    wl-copy $translated_text
    
    notify-send 'Translation: ' "$translated_text" --expire-time=60000 --category 'translation'
    
    rm $temp_image
    

    Translate script:

    #! /bin/ruby
    require_relative 'deepl_request'
    
    puts Translator::DeeplRequest
           .new(ARGV.join ' ')
           .translation
    

    This script is a bit hacky and one-off, I wouln’t just copy-paste it.



    • super+u shows a wofi menu allowing me to fuzzy find a credential from my password manager and copy its username
    • super+p same thing but for passwords
    • super+o same thing but for TOTP codes
    • super+t allows me to select an area of the screen, take a screenshot, run it through OCR, translate it to English via the deepl API, and then pop up the result as a desktop notification and also copy it to the clipboard. (I’m not fluent in the language of the country I live in)
    • ”lock” and „request” based suspend management, so my backup scripts or other long running jobs can keep the computer from sleeping until they are done.






  • trachestolinuxmemes@lemmy.worldCan I get your opinion?
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    22 days ago

    I just scrolled the whole thread and can’t find any at all, what are you talking about?

    Elitism isn’t „I like arch and I think it is good for some stuff”, it’s „I’m smart because I use arch, you’re dumb if you don’t, and any problems you have with it are your fault.”