I love when you encounter a leetcode problem that is one of the most challenging problems you have ever seen in your life and you look up the solution and it is the most brilliant thing you've ever seen, and website only lists the problem as medium difficulty

@wallhackio Leetcode requires an account and JavaScript, right? :blobcatverysad:

@wallhackio On Linux in general? Should be possible, yes. On PowerPC Linux? We'll find out soon enough...

Why are you asking?

@vaporeon_ someone made a CLI tool for using leet code. Although there is just a tarball you can get without needing to install node

@vaporeon_ it's here: github.com/skygragon/leetcode-. I only tested it on WSL but I was able to unpack (unzip? I don't know the proper terminology for tar gz files) it and it creates a folder with the executable leetcode-cli

@aescling @vaporeon_ I've heard it referred to as a tarball, is that what you're asking

@wallhackio @vaporeon_ it’s a zip-compressed (typically with gzip(1)) tarball, more precisely. if you unzip you get a tar(1) archive. a tar archive is a plaintext (mostly plaintext?) bundle of files; if you untar it you get the files laid out in the specified directory structure, along with their file purrmissions and such

@aescling @wallhackio Wait, do gzip and zip use the same compression? Thaty's what you seem to implying with the phrase "zip-compressed (typically with gzip(1))"...

To be clear: you would run gunzip (counterpart to gzip), to turn something.tar.gz into something.tar. But you don't even need that extra step, you can just tar xzf something.tar.gz and tar will do it for you. x means eXtract, z means gZipped file, f means you'll pass a file as argument instead of having it read from standard input. Actually, modern versions of GNU tar can even detect the compression automatically, you can just say tar xf something.tar.gz!

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.