Readit News logoReadit News
Posted by u/accessd 2 years ago
Show HN: Start every terminal session with a vivid reminder of life's valuegithub.com/accessd/the-la...
Hi! I've been using a similar browser extension for a long time. It kept me motivated. I decided to create the same thing for the terminal where I spend a lot of time.
t8sr · 2 years ago
The name is a missed opportunity - instead of "Last Sunday" it could be called the "Terminal Sunday".
accessd · 2 years ago
Got it!
3pt14159 · 2 years ago
I did something similar that I hand wrote but it's different verses from the Bible whenever I cd into my main working location. It helps me memorize verses slowly over time and it's not too intrusive though occasionally I'll disable it before pair programming on something with a colleague since it feels inappropriate at work to force someone else to put up with it if they have qualms about it.
mkii · 2 years ago
For the sibling commenters trying to grief OP, he never said he randomly selects verses. I wish you all a nice day.
paywallasinbeer · 2 years ago
Cool. Do you have a list of which verses you use? I'd like to do something similar myself.
3pt14159 · 2 years ago
Sure, it's a bit of a random list since it's not selected beforehand, but here are them:

- Romans 6:3

- Proverbs 16:9

- Matthew 5:9

- Galatians 5:22

- Galatians 5:6b

- Isaiah 55:9

- Psalm 117

- Psalm 23 (this is the largest one)

- Matthew 9:37,38

I'm pretty sure I've since memorized all of these so it is time to add more verses into the mix!

alsetmusic · 2 years ago
I had a similar thing, very unsophisticated at the time, to randomize quotes that I’d manually curated into a text file.
ironmagma · 2 years ago
You can always just open a new terminal and then quickly hit ctrl-L to clear. Gives an opportunity for them to ask if they care, or to just move on otherwise.
echelon_musk · 2 years ago
Yesterday I discovered fortune(1) and in turn display-dhammapada(1).

I'm tempted to set up a cron job and receive daily emails.

Were you just doing shuf(1) on a text file of Bible quotes?

3pt14159 · 2 years ago
Naw, I wanted to memorize certain ones. It's worked though. I'm pretty much there with all of the ones I picked.
selfawareMammal · 2 years ago
Aaaah gotta love me some Corinthians 14:34-35 in the morning
waihtis · 2 years ago
good, do the Quran next
lakpan · 2 years ago
Ah yes, I’d love to start the day reading a fresh “Numbers 31:17” verse. For pair programming I’d just stick to “Leviticus 18:22”
krunck · 2 years ago
And of course this person or any of us could keel over tomorrow. So maybe add :"Or maybe you have no Sundays left. YMMV.'
ssgodderidge · 2 years ago
"You might die tomorrow. How are you making this day a great last day?
matwood · 2 years ago
And conversely, you may live so how are you at the same time making tomorrow a good day?

This is the struggle of existence.

r3trohack3r · 2 years ago
Love this. Added it to my path under ~/.bin/mori

I simplified the output a bit so it fits on 2 lines. This renderers a single progress bar the width of the terminal: https://gist.github.com/retrohacker/19978af044a080ed5677c0ea...

    Memento mori (Latin for 'remember that you die') is an artistic or symbolic trope acting as a reminder of the inevitability of death.
https://en.wikipedia.org/wiki/Memento_mori

Rant423 · 2 years ago
Given the default life expectancy of 65, I am at almost 50%.

Fucking terrifying.

(I moved it up to 80 years)

rpastuszak · 2 years ago
That's such a sweet idea. If you're looking for a weekend project idea, I recommend flipping it 180: https://days.sonnet.io
addandsubtract · 2 years ago
This is much nicer! Added to the endless list of weekend projects.
netule · 2 years ago
That was beautiful, thanks for sharing.
gorkempacaci · 2 years ago
Thanks but I’d rather curb the anxiety in my life, not inflame it.
_false · 2 years ago
I'm using zsh with tmux and it's a bit frustrating to have it appear on every window and every pane. At the same time if it only appears once I might miss it. Does anyone have suggestions on how to make it appear only a handful of times per day?
o11c · 2 years ago
The problem with the RANDOM approach is that it scales with how many terminals you open on a given day. Compensating for that requires state.

I'm too lazy to write actual code right now, but here's a sketch of a possible solution that allows bursts. This is racy but safely so.

  declare N, the burst size. Say, 5.
  declare T, the time in seconds after which a new burst can start. Say, 3600.
  declare S, the time in seconds after which a new occurrence is allowed within a burst. Say, 10.
  declare P, a unique identifier. Say, the-last-sunday.
  declare D, the directory to store state in. Say, /tmp/bursty-ratelimiter.
  mkdir -p "$D"
  if "$D/$P-central" exists and its timestamp is within the last "$S" seconds, exit the process without doing anything else (hmm, I suppose when opening multiple panes at the same time, this race might actually matter ... I guess you could use a lock if it matters that much)
  touch (create and update the timestamp of) "$D/$P-central"
  for I from 1 to "$N"
    if "$D/$P-$I" exists and its timestamp is within the last "$T" seconds, continue with the next iteration
    touch "$D/$P-$I"
    run the rest of the program under load
  exit the process without doing anything

jcul · 2 years ago
Maybe just touch a file somewhere in /tmp or /run or somewhere and do if [ -f $file ]; then touch $file ...

If you never reboot could set up a cron job to delete it. Or store a counter in the file and output each time it reaches x % N.

Might be susceptible to race conditions, so could wrap it in a flock or something...

accessd · 2 years ago
You can run it randomly with: (( RANDOM%2 == 0 )) && $HOME/last_sunday.sh

Or add after the command ;sleep 1;clear

to clear the screen after one second.

Deleted Comment

bambax · 2 years ago
Sunday's the worst day of the week. I wouldn't mind if there were zero Sundays left.
rngname22 · 2 years ago
Sounds like you should be spending your Sundays on trying to make it so that some future Sundays aren't so bad.
bakuninsbart · 2 years ago
I'm surprised that there's someone out there seeing it that way, and would be interested in hearing your reasons if you don't mind. Unless I'm hungover from a Saturday evening, Sunday is the day where I can be most creative and most free.
tkiolp4 · 2 years ago
I don’t like Sundays either. Reasons:

- I know Monday is coming, so I need to go to sleep early

- The day is shorter since I wake up late because Saturday was a long nice day, and because of previous point

- everything is closed. Not that I care much, but it limits the options of “what to do today”

Favorite day: Saturday and then Friday

mkii · 2 years ago
I'm surprised someone's surprised, it's a well-known thing: https://en.wiktionary.org/wiki/Sunday_scaries