this post was submitted on 19 Jul 2023
105 points (100.0% liked)

Programmer Humor

418 readers
17 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 20 comments
sorted by: hot top controversial new old
[–] mayoaddict@pawb.social 14 points 1 year ago (1 children)
[–] z3n0x@feddit.de 3 points 1 year ago

"this is my life now"

[–] Eufalconimorph@discuss.tchncs.de 13 points 1 year ago (2 children)

cat /dev/zero > "/proc/$(pidof vim)/mem" is my favorite dumb way. Clear its memory, wait for the segfault.

[–] julianh@lemm.ee 2 points 1 year ago (1 children)

...you can write to program memory? Idk how exactly but that feels like a security risk.

[–] nintendiator@feddit.cl 6 points 1 year ago (1 children)

It's your process, why shouldn't you be able to write to it? Vi is certainly doing it...

You do need to be root to do it to arbitrary processes.

[–] vrkr@programming.dev 1 points 1 year ago* (last edited 1 year ago)

dumb way.

Get fancy, add progress bar: pv < /dev/zero > "/proc/$(pidof vim)/mem"

[–] cloudless@feddit.uk 9 points 1 year ago

Amateur. Just unplug the power cable.

[–] graham1@gekinzuku.com 5 points 1 year ago (1 children)
[–] Kerb@discuss.tchncs.de 4 points 1 year ago (1 children)

holy crap,
that's exactly what i wanted the last command to do.

i just didn't know you can target jobs,
and settled with quitting the shell instead

[–] graham1@gekinzuku.com 2 points 1 year ago

yeah it's my favorite way to exit Vim. I post it every time I get a chance lol https://gekinzuku.com/comment/202790

[–] mormegil@programming.dev 4 points 1 year ago

There's a whole repo of possible methods: https://github.com/hakluke/how-to-exit-vim

[–] docAvid@midwest.social 3 points 1 year ago

M-! pkill -9 vim

[–] princess@lemmy.blahaj.zone 3 points 1 year ago

Alt+PrtScn o

[–] Boermund@feddit.de 1 points 1 year ago

One panel below: shut down the computer

[–] onescomplement@lemm.ee 1 points 1 year ago
[–] JohnJVaccaro@lemmy.sdf.org 1 points 1 year ago

try...

:x

it will save your changes and exit vim If there are no changes to the then it just exits vim.

[–] Ducks@ducks.dev 1 points 1 year ago

til shift-z shift-z. am I stupid

[–] Just_Dominic@programming.dev 1 points 1 year ago
  1. Ctrl + T + alt
  2. sudo reboot
[–] Kolanaki@yiffit.net 1 points 1 year ago

Does unplugging the machine not work?