Lightfire228

joined 1 year ago
[–] Lightfire228@pawb.social 2 points 2 months ago (1 children)

What about quaternions?

[–] Lightfire228@pawb.social 22 points 2 months ago (2 children)

Cats are toddlers that can reach the ceiling

[–] Lightfire228@pawb.social 8 points 2 months ago (3 children)

Can we never joke about sensitive topics?

Isn't humor like, our primary coping mechanism for dealing with dark topics?

[–] Lightfire228@pawb.social 18 points 2 months ago* (last edited 2 months ago) (2 children)

Maybe the light in the dash was shorting, causing the light to turn on on its own

And screaming was juuuust enough to cause the short to break connection?

It's either that or ghosts

[–] Lightfire228@pawb.social 1 points 2 months ago* (last edited 2 months ago)

that is a little more complicated

p.communicate() will take a string (or bytes) and send it to the stdin of the process, then wait for p to finish execution

there are ways to stream input into a running process (without waiting for the process to finish), but I don't remember how off the top of my head


from shutil import which
from subprocess import Popen, PIPE, run
from pathlib import Path

LS   = which('ls')
REV  = which('rev')

ls   = run([LS, Path.home()], stdout=PIPE)

p = Popen([REV], stdin=PIPE, stdout=PIPE)
stdout, stderr = p.communicate(ls.stdout)

print(stdout.decode('utf-8'))
[–] Lightfire228@pawb.social 1 points 2 months ago (1 children)

nushell is pretty good. I use it for my main shell

although, i still prefer writing utilities in python over nu scripts

[–] Lightfire228@pawb.social -2 points 2 months ago* (last edited 2 months ago) (3 children)

just use python instead.

  • wrap around subprocess.run(), to call to system utils
  • use pathlib.Path for file paths and reading/writing to files
  • use shutil.which() to resolve utilities from your Path env var

Here's an example of some python i use to launch vscode (and terminals, but that requires dbus)


from pathlib import Path
from shutil import which
from subprocess import run

def _run(cmds: list[str], cwd=None):
    p = run(cmds, cwd=cwd)

    # raises an error if return code is non-zero
    p.check_returncode()

    return p

VSCODE = which('code')
SUDO   = which('sudo')
DOCKER = which('docker')

proj_dir = Path('/path/to/repo')

docker_compose = proj_dir / 'docker/'

windows = [
  proj_dir / 'code',
  proj_dir / 'more_code',
  proj_dir / 'even_more_code/subfolder',
]
for w in windows:
  _run([VSCODE, w])

_run([SUDO, DOCKER, 'compose', 'up', '-d'], cwd=docker_compose)
[–] Lightfire228@pawb.social 6 points 2 months ago (1 children)

I've started collecting ideas in my notes

I open Obsidian, create a new note, and jot down the idea

Obsidian is preconfigured to add new notes to an Inbox folder, and the note's name defaults to the date and time

At a later time, I go through my inbox and rename and recategorize


This makes writing down ideas painless, while also minimizing the interruption of whatever I was doing at the time

[–] Lightfire228@pawb.social 0 points 2 months ago (2 children)

Why is there so much political messaging right now

Fuck off with all the democracy doomsday posting, I just want to see funny memes

[–] Lightfire228@pawb.social 2 points 2 months ago

Don't leave snow on the roof when you drive

It can peel off in a giant ice sheet in the wind and destroy the car behind you

Or otherwise, create a mini blizzard and make it impossible to see

[–] Lightfire228@pawb.social 4 points 2 months ago* (last edited 2 months ago)

Speaking as the "never wore winter clothes" kid, when you're overweight, you can tolerate colder weather due to body fat being a natural insulator

Combine that with a natural tolerance for cold, and sensory issues with heavy clothes, and you get this.

To the point where I had many fights with my parents over it

(I still wear sandals year round because fuck shoes)

view more: ‹ prev next ›