Giter Site home page Giter Site logo

qasimwani / leethub Goto Github PK

View Code? Open in Web Editor NEW
3.8K 25.0 1.3K 19.76 MB

Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

Home Page: https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi

License: MIT License

CSS 3.32% HTML 13.54% JavaScript 83.14%
leetcode chrome-extension coding-interviews github-api github leethub javascript portfolio chrome

leethub's Introduction

LeetHub - Automatically sync your code to GitHub.
LeetHub - Automatically sync your code to GitHub.

license discord chrome-webstore users

Top 5 Trending JavaScript Repositories

LeetHub progress and numbers (YouTube Video):

LeetHub

What is LeetHub?

A chrome extension that automatically pushes your code to GitHub when you pass all tests on a Leetcode problem.

How fast is it really?

THIS FAST (~400ms, 530x speed improvement)!

Why LeetHub?

1. Recruiters want to see your contributions to the Open Source community, be it through side projects, solving algorithms/data-structures, or contributing to existing OS projects.
As of now, GitHub is developers' #1 portfolio. LeetHub just makes it much easier (autonomous) to keep track of progress and contributions on the largest network of engineering community, GitHub.

2. There's no easy way of accessing your leetcode problems in one place!
Moreover, pushing code manually to GitHub from Leetcode is very time consuming. So, why not just automate it entirely without spending a SINGLE additional second on it?

How does LeetHub work?

Your LeetHub portfolio could look like this!

It's as simple as:

  1. After installation, launch LeetHub.
  2. Click on "authorize with GitHub" button to automatically set up your account with LeetHub.
  3. Setup an existing/new repository with LeetHub (private by default) by clicking "Get Started" button.
  4. Begin Leetcoding! To view your progress, simply click on the extension!

BONUS: Star this repository for further development of features. If you want a particular feature, simply request for it!

Why did I build LeetHub?

The coding interview is arguably the most important part of your interview process, given you get the interview first. As someone who's received multiple internship offers from Fortune 100 companies, getting the interview in the first place is not easy!
And that's what LeetHub is supposed to do: indirectly improving your coding skills while improving your portfolio to ACE that interview at insert_name_here!

Let's see you ACE that coding interview!

leetcode view

How to set up LeetHub for local development?

  1. Fork this repo and clone to your local machine
  2. Go to chrome://extensions
  3. Enable Developer mode by toggling the switch on top right corner
  4. Click 'Load unpacked'
  5. Select the entire LeetHub folder
  6. Run "npm run setup" to install the developer dependencies

Other npm commands available:

npm run               Show list of commands available
npm run format        Auto-format JavaScript, HTML/CSS
npm run format-test   Test all code is formatted properly
npm run lint          Lint JavaScript
npm run lint-test     Test all code is linted properly

And that should be it! Get Hacking...

leethub's People

Contributors

a-aznar avatar arjixwastaken avatar arnabsen1729 avatar asahu16 avatar ayoung19 avatar benlowenthal avatar bpires avatar bro3886 avatar jeremytsaii avatar mahbubcseju avatar mayankkumar2 avatar myu-ekata avatar njelich avatar qasimwani avatar syssn13 avatar tuminzee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leethub's Issues

[Feature request] Solutions in multiple languages

Hi, thanks for building this useful extension. I use both Python and Java for leetcode and I saw that whenever I submitted a solution after the first time in a different language, there was no new commit to the repo updating the file. Is it possible to customize the extension such that different files are kept for different languages and these are updated whenever a solution is submitted?

Repository specific access

LeetHub currently requests access to all private and public repositories with full access.
Submitting this issue to restrict this to the repository that LeetHub commits to only. The user should be able to link LeetHub and grant it access to the repository of choice.

The submission can only be committed once in a page without refreshing it.

Hi QasimWani,

I wanted to update my submissions by submitting the different solution many times in the same page without refreshing it,
but I found there is only the first submission will be committed, the latter submissions won't. After refreshing the page and submitting it again, the submission is committed.

Should all the submissions be committed in the same page (no refresh)?

Looking for maintainer/co-developer

Hey all,
Firstly, thanks for using LeetHub. If you're interested in helping me develop LeetHub, please add your name/linkedin below as comment below. Quite frankly, I can't get to all these features in time, so I'd appreciate any help!
The only pre-req is some expertise in JS. Preferred if knowledge in chrome-extensions, but that's not necessary!
Looking forward to it :D

generate commit based on question difficulty

Current:

working commit - Created using LeetHub

Suggestions:

easy - created using LeetHub
medium - created using LeetHub
hard - created using LeetHub

Could be gitmoji commits too:

:feelsgood: easy - created using LeetHub
:rage1: medium - created using LeetHub
:godmode: hard - created using LeetHub

Re-commit when update is made to answer

After submitting a correct answer I went to modify my code to improve its run time. It would be nice if LeetHub committed your most recent submitted answer.

Buggy Problem Counter

Tested by submitting 3 questions and now the problem counter says 7. Will try to delve further into this later and hopefully fix it.

FireFox Support

amazing idea! Is there a plan to make a FireFox extension? I've never made one but this could be my xmas project. I can't imagine that it's too far removed from a Chrome Extension

Out of curiosity.. Will the dynamic css class names change after leetcode re-deployment?

Great work on this project. ๐Ÿ‘

Might not be an issue, but I was looking at the source code and found references to dynamic css class names which seems to be generated by React Framework.
For example:

// Problem difficulty, each problem difficulty has its own class.

  const isHard = document.getElementsByClassName('css-t42afm');
  const isMedium = document.getElementsByClassName('css-dcmtd5');
  const isEasy = document.getElementsByClassName('css-14oi08n');

My guess is that these will change whenever leetcode does a rebuild of their webpack bundle.

I think this might need to be handled in a different manner. What do you think?

No option to auto save files in a subfolder inside repo

Very useful extension Qasim! Another feature that'll be great to have is an option that let us set the autosave location as a subfolder inside an already existing repo, maybe something like typing [existing repo name] / [subfolder inside repo] in the repo name field on the welcome page.
If possible, an option to set custom commit summary and message would be great too.

unable to update update existing files in dir

Receiving 409 error, however no conflict was found from API. sha was properly stored and recorded, so that can't be the error. Body and header is added correctly.
Need to revisit this to fix before production.

Push Discuss Posts from LeetCode on GitHub

There are many LeetCode users, including me, who post their solutions and solution insights on the Discuss forum for each question. Can you add a feature to include these posts as well on the GitHub repo.

Problem deletion doesn't update problem counter

When manually deleting a file from repository, problem counter is not updated. Either implement a periodic file-counter checkup, or implement problem solved as get request, and not store it in chrome local storage.

[Feature Request]

I have been using your extension for a large time and want to tell you that it is very awesome and super helpful. As I have observed that right now whatever solution gets submitted first is only stored in the GitHub repo. It will be great if there are multiple solutions support added to it. Like if we submit a solution before and afterwards submit another solution of the same problem, this time more optimized or maybe in some other Programming Language then the extension should create a new file for that submission. This way we can store multiple solutions for the same problem at the same place. This will be act as a plus one during our revision times.

Versioning of Solutions on Github

If there are multiple submissions on Leetcode having better submissions solution time and memory then please version the solutions on github

Inconsistent commits

Wonderful plugin- although I've noticed that it only pushes sometimes and mostly doesn't on submissions after the first initial successful submission. It'd be great if there was an option to enable or disable commits after the first initial commit. Personally, I improve my code after my initial solution, and I want the plugin to commit my improved code.

Full solution not being committed, bottom portion is being cropped out.

For example this solution : https://leetcode.com/submissions/detail/440843946/

Gets ported over to git as this : https://pastebin.com/uG0nf7wN

Its cutting off the bottom part of the solution for some reason.

Using Chrome Version 87.0.4280.88 (Official Build) (64-bit)

UPDATE : I realize that this issue is related to the scroll wheel for the problem solution. I would recommend trying to get the latest submission, then viewing the submission page to get the code itself as it looks like the scroll wheel is throwing off the code copying to github. I was able to get the full solution content in GitHub but only after zooming out in chrome to the point that the scroll wheel disappeared. E.g. :
image

And then the file committed to github was : https://pastebin.com/XGvepCSX

Suggestion: Updating solutions

Great product man!

One idea is: if you resolve a leetcode solution, it should perhaps update the file on GitHub, as often times, the first solution to a problem isn't your best solution!

No option to auto save files in a subfolder inside repo

The files are autosaved to either a newly created repo or an existing repo. It'll be great to have an option to set the location as a subfolder inside a repo. If possible, feature of a custom commit summary and message will be great too.

Display Extra Info

There is room for more statistics displayed to the user. An easy one to implement is Easy/Med/Hard distribution in the LeetHub popup/welcome and GitHub Repo README. Perhaps in the future, some more complex ones can be added in such as problem type/data structures distribution (ex. Greedy, Hash Map).

Solution doesn't re-upload to Github repo

Hello, the solution doesn't seem to be re-uploading to Github repo. I'd expect it to force push the new commit or maybe open a PR for it? Open for discussion

Steps to reproduce:

  1. Have a successful submission of an unvisited problem
  2. Verify that the solution is uploaded to Github repo
  3. Re-submit the problem with some comments

Expected Behavior:
Not sure if force push the new commit or open a PR is a better solution

Current Behavior:
None

Improper Naming in Mock Interview

When doing a mock interview, the plugin incorrectly committed the question with the filename "1.cpp" and the second question was not committed.

[Feature Request] Add "sync all solved problems" button

Hi Qasim Wani,

It's a very useful project, and how about having a "sync all solved problems" button to sync all solved problems on LeetCode but not in the specific repository?

It will be helpful for those who used to solve problems on LeetCode but are new to your extension.

Thank you for your contribution, I really appreciate it!

New Submissions Not Recommitting

Seems like you have to navigate away from the problem then come back and resubmit before a submission is recommitted on GitHub. Is this on purpose?

Safari support?

As a Mac user, I opt'd to switch from Google Chrome back to Safari for better power savings. I was wondering if you're planning on creating an extension for Safari browsers?

New solution isn't updated

Somehow for problems that were already submitted to Github by Leethub before, when I redo them, the new solutions are not pushed to Github anymore.
I have tried to reload Leetcode after each submission but still didn't get it working.

I.e.:
I have just submitted a new solution to this problem:
image
But the last solution on Github was still the one that I submitted on Dec 7:
image

Official solutions folder for premium users

Issue title is pretty self-explanatory but basically I just want official solutions available as a sub-folder of the problem folder with each solution having its own file. Would be great to have corresponding READMEs containing detailed explanations for official solutions but I'm fine with just copy pasting the code solutions

Submission Change?

Hey, not sure how feasible this is to implement, but I was wondering if you were considering that if you resubmit a solution, the app will commit & push this new submission to the repo instead (and over ride the previous - or maybe make a v1 and a v2 .java file?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.