You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced.md
+60-54Lines changed: 60 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -17,65 +17,68 @@ Leetcode.com is restricting only one session alive in the same time, which means
17
17
18
18
The good news is leetcode-cli will help a lot on this by trying re-login transparently and automatically without interrupting your current work whenever it detects your current session is expired. To enable this feature you could add following in your config then login again:
19
19
20
-
{
21
-
"autologin": {
22
-
"enable": true
23
-
}
24
-
}
20
+
{
21
+
"autologin": {
22
+
"enable": true
23
+
}
24
+
}
25
25
26
26
**NOTE: once enabled, your PASSWORD will be persisted locally for further using, so PLEASE be careful to ONLY enable this on your OWN computer for the sake of security!**
27
27
28
28
# Bash Completion
29
29
30
30
Copy `.lc-completion.bash` to your home directory, and source it in .bashrc (Linux) or .bash_profile (MacOS).
**NOTE: it might become slower in bash with this enabled, personally I would NOT suggest to use it...**
40
40
41
41
# Cache
42
42
43
43
The local cache folder (`.lc/`) is in your home directory, e.g.
44
44
45
-
$ ls -a1 ~/.lc/
45
+
$ ls -a1 ~/.lc/
46
+
cache # folder of cached questions
47
+
config.json # user customized config
48
+
user.json # user account info
46
49
47
-
.user.json # your account info
48
-
problems.json# problems list
49
-
1.two-sum.algorithms.json # specific problem info
50
+
$ ls -a1 ~/.lc/cache/
51
+
problems.json # cached questions list
52
+
1.two-sum.algorithms.json # cached specific question
50
53
51
54
**NOTE: Normally you don't need dig into the folder to manipulate those files. Use [cache command](https://skygragon.github.io/leetcode-cli/commands#cache) instead.**
52
55
53
56
# Configuration
54
57
55
-
Create a JSON file named `.lcconfig` in your home directory, e.g.
56
-
57
-
$ cat ~/.lcconfig
58
-
59
-
{
60
-
"auto_login": {
61
-
"enable": false
62
-
},
63
-
"code": {
64
-
"editor": "vim",
65
-
"lang": "cpp"
66
-
},
67
-
"color": {
68
-
"enable": true,
69
-
"theme": "default"
70
-
},
71
-
"icon": {
72
-
"theme": ""
73
-
},
74
-
"network": {
75
-
"concurrency": 10
76
-
},
77
-
"plugins": {}
78
-
}
58
+
The config file is saved in `~/.lc/config.json`, here is a full exmaple (includes default configs):
59
+
60
+
$ cat ~/.lc/config.json
61
+
62
+
{
63
+
"auto_login": {
64
+
"enable": false
65
+
},
66
+
"code": {
67
+
"editor": "vim",
68
+
"lang": "cpp"
69
+
},
70
+
"color": {
71
+
"enable": true,
72
+
"theme": "default"
73
+
},
74
+
"icon": {
75
+
"theme": ""
76
+
},
77
+
"network": {
78
+
"concurrency": 10
79
+
},
80
+
"plugins": {}
81
+
}
79
82
80
83
Here are some useful settings:
81
84
@@ -93,18 +96,18 @@ Here are some useful settings:
0 commit comments