traches

joined 2 years ago
[–] traches 2 points 1 day ago

It’s like 15 years old from back when I used to PVP in EVE online. Vaguely weird to pronounce and towards the middle of the alphabet so I don’t get primaried

[–] traches 10 points 5 days ago (1 children)

If encryption is enabled, don’t worry about it. Otherwise ‘dd if=/dev/zero of=definitely-the-bad-drive-do-not-fuck-this-up bs=4M’

[–] traches 5 points 2 weeks ago

„Sky tweets”

[–] traches 28 points 2 weeks ago (13 children)

Sovcits are funny and all but we don’t need to lick boots about it

[–] traches 19 points 2 weeks ago

I am immensely more fulfilled and content now than when I thought there was a wizard in the sky who reads my mind and judges me

[–] traches 0 points 2 weeks ago

Agreed, that should be many tens of pages not one. Also the mobile layout isn’t very good. I think it’s important to remember that normies use their phones for almost everything.

[–] traches 4 points 2 weeks ago (1 children)

Hey cool, I learned something. Thanks!

[–] traches 17 points 2 weeks ago* (last edited 2 weeks ago)

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.

[–] traches 1 points 2 weeks ago (3 children)

This is what I'm talking about:

Code for copy-pasting:

type NonEmptyArray<T> = [T, ...T[]];

function neverEmpty<T>(array: T[]): NonEmptyArray<T> | null {  
    if (array.length === 0) return null

    return array
}
[–] traches 30 points 2 weeks ago (3 children)
  • 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.
 

I have a load-bearing raspberry pi on my network - it runs a DNS server, zigbee2mqtt, unifi controller, and a restic rest server. This raspberry pi, as is tradition, boots from a microSD card. As we all know, microSD cards suck a little bit and die pretty often; I've personally had this happen not all that long ago.

I'd like to keep a reasonably up-to-date hot spare ready, so when it does give up the ghost I can just swap them out and move on with my life. I can think of a few ways to accomplish this, but I'm not really sure what's the best:

  • The simplest is probably cron + dd, but I'm worried about filesystem corruption from imaging a running system and could this also wear out the spare card?
  • recreate partition structure, create an fstab with new UUIDs, rsync everything else. Backups are incremental and we won't get filesystem corruption, but we still aren't taking a point-in-time backup which means data files could be inconsistent with each other. (honestly unlikely with the services I'm running.)
  • Migrate to BTRFS or ZFS, send/receive snapshots. This would be annoying to set up because I'd need to switch the rpi's filesystem, but once done I think this might be the best option? We get incremental updates, point-in-time backups, and even rollback on the original card if I want it.

I'm thinking out loud a little bit here, but do y'all have any thoughts? I think I'm leaning towards ZFS or BTRFS.

 

Not sure about the artist, sorry

 
view more: next ›