Giter Club home page Giter Club logo

gitsync's Introduction

GitSync

What is GitSync

GitSync is a python script that uploads the most recent solution of all your Leetcode problems to Github. It is inspired GitCode because it is not realistic to sync all 2k questions from Leetcode to Github in a web extension.

System requirements

everything is containerized so there's no need to worry about dependencies. All you need to have is Docker and you are all set.

To run

docker run -it -e LEETCODE_SESSION="<session>" --rm andythsu/gitsync

How to get LEETCODE_SESSION environment variable

  1. Log in to https://leetcode.com
  2. Open console by pressing ctrl+shift+j or right click and choose inspect
  3. Navigate to Application tab
  4. Select Cookies on the left panel
  5. Copy the value for LEETCODE_SESSION

Troubleshooting

Traceback (most recent call last):
  File "/usr/src/app/main.py", line 92, in <module>
    main()
  File "/usr/src/app/main.py", line 54, in main
    lc_api = LCApi()
             ^^^^^^^
  File "/usr/src/app/lc.py", line 17, in __init__
    self.test_lc_connection()
  File "/usr/src/app/lc.py", line 26, in test_lc_connection
    assert res["data"]["userStatus"]["isSignedIn"] is True
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

This error means the provided LEETCODE_SESSION failed to authenticate the user.

gitsync's People

Contributors

andythsu avatar

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.