Skip to content

Keithagy/grindset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grindset

Simple, minimal helper with setting up Leetcode practice in your comfy local dev env: Output example

Dependencies

  • Pandoc (we use this to handle html parsing + markdown output)
  • Rust toolchain (we use this to compile)

(Un)Install

To install, execute the following in project root:

cargo install --path .

To uninstall, execute the following in project root:

cargo uninstall

Check installation:

which grindset

Usage

Make sure you're in the correct directory, we currently don't have project root tracking!

grindset relies on leetcode question slugs, which you can reliably get from your browser's address bar: Where to find question slug from Leetcode url

Recommended

grindset returns the path of the created attempt directory for piping and chaining. So, if you use an in-terminal editor like Neovim , you can jump into your editor with a single command.

cd $(grindset two-sum py) && nvim $(find attempt.*)

Set up a shell alias for it, if you'd like!

Basic

grindset two-sum py

Notes

  • grindset adds starter boilerplate for your language if available from Leetcode's API, but Leetcode's API does not necessarily provide fully valid boilerplate. Some examples:
    • Go boilerplate snippets would not include the requisite package main declaration.
    • Python boilerplate might include type hints in function signatures that you would then need to import.
  • Be careful that you're running the command in the root of your project, as files get created at the current working directory.
    • This might improve in a subsequent version, with the addition of a project root marker file (e.g. grindset.toml).

About

simple tool to help track leetcode practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages