4 ms·
Posted on GitHub: "unfortunately I lost the Go source code"
by readthenotes1 2y ago
Posted on GitHub:
"unfortunately I lost the Go source code"
- SillyUsername 2y agoFollowed 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...
- adtac 2y agoI 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.
- stavros 2y agoOh man, apparently I'm not alone in using /tmp/ as my storage space. I like it because it's self-cleaning!
- medstrom 2y agoYou could have /home/junk2020, /home/junk2021, /home/junk2022 etc. Still self-cleaning, but it's once a year.
- vrotaru 2y agoYou know what else is self-cleaning? /dev/shm The advantage being that it does not even touch the disk.
- _flux 2y agoOne can use tmpfs for /tmp as well (and I do it).
- _flux 2y agoI present you my most used shell function: cdtmp() { cd $(mktemp -d) }
- stavros 2y agoThat'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.
- _flux 2y agoI 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!
- stavros 2y agoThank you! That's very neat, I'll implement this myself as well.
- e-Minguez 2y agoI'm team /home/user/Downloads/tmp
- gala8y 2y agoThis resonates funnily with "I hacked this together last night for fun" a bit down the page.
- theonemind 2y ago"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
- thaumasiotes 2y ago> It is impossible to separate a cube into two cubes Later disproved by the Banach-Tarski theorem. ;D
- tuananh 2y agowhere is this posted? i didn't see in in gist.github link.
- SillyUsername 2y agoIt's under the section "step 2"