News for hackers. Stuff that matters.
Re:Using your Kindle as an e-ink monitor by readthenotes1 on Sunday August 04, 2024 @03:15PM (#41155611)
Posted on GitHub:

"unfortunately I lost the Go source code"

Re:Using your Kindle as an e-ink monitor by SillyUsername on Sunday August 04, 2024 @03:36PM (#41155774)
Followed up with "but it was pretty simple, like under 30 lines"

So simple in fact, that it wasn't quickly rewritten and added to GitHub...

Re:Using your Kindle as an e-ink monitor by adtac on Sunday August 04, 2024 @03:44PM (#41155822)
I should stop writing code in files like /tmp/x.go no matter how throwaway I think the code might be. I still have the linux/armv7 binary if anyone wants it lol.
Re:Using your Kindle as an e-ink monitor by stavros on Sunday August 04, 2024 @04:15PM (#41156034)
Oh man, apparently I'm not alone in using /tmp/ as my storage space. I like it because it's self-cleaning!
Re:Using your Kindle as an e-ink monitor by medstrom on Sunday August 04, 2024 @04:39PM (#41156176)
You could have /home/junk2020, /home/junk2021, /home/junk2022 etc. Still self-cleaning, but it's once a year.
Re:Using your Kindle as an e-ink monitor by stavros on Monday August 05, 2024 @04:23AM (#41159145)
Or I could have /home/junk, self-cleaning but never!
Re:Using your Kindle as an e-ink monitor by girishso on Monday August 05, 2024 @10:01AM (#41161453)
That is me, I have `/home/delme` since forever!
Re:Using your Kindle as an e-ink monitor by vrotaru on Monday August 05, 2024 @01:13AM (#41158337)
You know what else is self-cleaning?

   /dev/shm
The advantage being that it does not even touch the disk.
Re:Using your Kindle as an e-ink monitor by _flux on Monday August 05, 2024 @04:38AM (#41159232)
One can use tmpfs for /tmp as well (and I do it).
Re:Using your Kindle as an e-ink monitor by _flux on Monday August 05, 2024 @04:36AM (#41159221)
I present you my most used shell function:

    cdtmp() {
        cd $(mktemp -d)
    }
Re:Using your Kindle as an e-ink monitor by stavros on Monday August 05, 2024 @04:41AM (#41159246)
That's fantastic, thanks! I always used to do this by hand. Though one downside is that the name is random, and it's hard to go back if you CD out. I might use diceware to make a memorable random name.
Re:Using your Kindle as an e-ink monitor by _flux on Monday August 05, 2024 @06:06AM (#41159656)
I agree that sometimes that is a problem, so I find out the latest tmp directory with ls -tr /tmp | tail. But using nicer names would help with that.

So I took your tip and now I have

    cdtmp() {
        local name
        name=/tmp/$(diceware --no-caps -d - -n 2)
        mkdir $name && cd $name
    }
I decided not to worry about the directory existing already, or of the other checks mktemp -d would do for me in my single-user system.. I suppose mktemp -d -t cdtmpXXX would work almost as well. Thanks for the idea!
Re:Using your Kindle as an e-ink monitor by stavros on Monday August 05, 2024 @11:01AM (#41162003)
Thank you! That's very neat, I'll implement this myself as well.
Re:Using your Kindle as an e-ink monitor by e-Minguez on Monday August 05, 2024 @05:54AM (#41159606)
I'm team /home/user/Downloads/tmp
Re:Using your Kindle as an e-ink monitor by gala8y on Sunday August 04, 2024 @03:53PM (#41155886)
This resonates funnily with "I hacked this together last night for fun" a bit down the page.
Re:Using your Kindle as an e-ink monitor by theonemind on Sunday August 04, 2024 @04:58PM (#41156293)
"It is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second, into two like powers. I have discovered a marvelous proof of this, which this margin is too narrow to contain" - Pierre De Fermat
Re:Using your Kindle as an e-ink monitor by thaumasiotes on Monday August 05, 2024 @04:17AM (#41159114)
> It is impossible to separate a cube into two cubes

Later disproved by the Banach-Tarski theorem. ;D

Re:Using your Kindle as an e-ink monitor by tuananh on Sunday August 04, 2024 @09:55PM (#41157580)
where is this posted? i didn't see in in gist.github link.
Re:Using your Kindle as an e-ink monitor by SillyUsername on Monday August 05, 2024 @07:58AM (#41160430)
It's under the section "step 2"