-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cascading cheat sheets #98
Comments
In cheat.sh-vim, the user can already set the server url by adding the following to its vimrc :
|
@dbeniamine Perfect! |
The url for cheat.sh is a constant in my Emacs package, although I guess with this approach it'd make more sense to have it be a |
Added to vscode-snippet via mre/vscode-snippet@1df3034. |
Support for windows client added: https://github.com/tpanj/cht.exe/releases/tag/v0.6 |
@tpanj Perfect, Tadej! Thank you very much (updated the main page) |
hey @chubin what's the status on this and where can one help? also does this allow me to have my own cheatsheets in my own Github repo that I can point it to, or is the only option now to deploy it myself? |
@zweicoder This mode will be available soon (and the second important feature, offline usage, too). The problem was that it was hard to implement these features (as well as several other features) without some refactoring, and it is almost done. With the new cascading cheat sheets feature it will be possible to have your own cheat sheets, and even your own adapters to connect other information sources such as Jira for example |
that sounds awesome! i was planning to add some quick hack to have an offline cache but since you guys will have it soon I'll wait patiently :) |
but keep in mind that in the first version with offline cheat sheets support, it will be not possible to make arbitrary programming languages queries (not yet); only cheat sheet queries: this will work:
And this wont:
|
Is there any update on this feature? |
@Fake4d That is exactly what I am currently working on. Estimated DoD of the initial version: 1 May |
The feature is almost done. There are still several minor things open + documentation. @Fake4d May I ask you about your prospective usecase? @zweicoder The same. Both (1) offline usage + (2) cascading cheat sheets are supported now. |
@chubin I am working in a closed forensic environment with lots of servers and clients. I would love to see the cheat.sh as a clone in this environment without internet. I would activate a DNS for cheat.sh and copy the files and sources on a server with webserver. Then I hope i can use "curl cheat.sh" from every computer in this network! Is this your idea of the offline environment? |
@Fake4d Yes, this would work. |
I would love to have some of the official cheat sheets not our own. I dont know whether it is possible to use the ones from the github repo? |
@Fake4d Yes sure, that would work. I will upload the documentation soo, and you will see that this would work pretty good. But what I wanted to ask was is (1) do you want to add your own cheat sheets or do you want to use only the public ones, and if you want it, then (2) what repository would you use for your own cheat sheets? Some internal git repository? |
@chubin Yeah probably we would add some own repositorys too! We have Gitlab here and some own programs with man pages. But i could bring it in the right format if needed. |
@Fake4d It sounds very good. The mediawiki can be bound too. Using pandoc, wiki pages can be converted into markdown, and markdown is handled by cheat.sh pretty good. I will help you with that if you will need my help. Today the penultimate test became green, I hope that tomorrow the last one will be fixed, and then the branch can be merged, and deployed first on the staging server and then on the live server. And if everything will be fine, you can start with the deployment. |
@Fake4d I've merged the development branch. All tests are green. To install the standalone version:
By default Python 2 is used, but Python 3 is supported too. You can switch it to Python 3 (in the cht.sh shell script code). After cheat.sh is installed in the standalone mode, it can be used as a server (but you need a redis server for that, for the cache; see the config file). Let us try from the standalone installation, and I will update the documentation in the meantime. |
I tried the stand-alone installer on an fully patched Ubuntu 18.04 with Python3 - even with the solutions of some tickets to use it with python3 instead of python2 i was not able to install it locally - I got install dependency failures..
corrected into
This solution was from the issue #157 Here is my last output: If i want to install the docker container i run into the problem, that there is no file named I hope this summary could help - If i can do anything just let me know! |
@Fake4d See also: https://stackoverflow.com/questions/40940188/error-installing-pip-pyicu |
@Fake4d you need this too: |
@chubin Already installed in its newest version:
|
@Fake4d Ganz komisch. Wenn man aber |
@chubin Now it finally builts after I installed I can now start to test this kind of repository! Looks really nice in this version - I think it would be a good idea to port cheat.sh to python3 with all the dependencies inside ? What do you think? Afterwards maybe we could check the docker file? |
This test is ok, it should be updated; just ignore it for the moment. Regarding Python 3: it is already supported; no additional fixes needed. The ICU dependency should be mentioned explicitly; and maybe it is better to do it optional. It is only for foreign languages queries And regarding Docker, yes; it would be great to fix it |
Would it be a good idea to make python3 the standard? Or are there other dependencies?
Is there a way i can help creating the 'share/scripts/get-sheets.sh' ? |
Yes, I think it would be a good idea. get-cheets.sh: that was an old Dockerfile that was contributed by someone, and that was not really actively maintained/developed; it is not relevant now, after the standalone mode was implemented. Instead of this file we just should use
|
Sorry, I don't find any document explain how to create a private repo. I try to change In theory anyone can do that. But in reality if we don't have document just a very small people spent time to understand how the source code work |
@Kidman1670 Excuse me for the disappearance; all your suggestions are fair and accepted; I will post an update as soon as this is done. The feature is experimental and not yet released/documented. I hope to do it in future |
With our "cascading cheat sheets" mode (it will be described in README.md soon), you can create a hierarchy of cheat sheets servers, where each server delivers local cheat sheets + if a requested cheat sheet is not found, the query is forwarded to the upstream server (and so on).
For the user it looks fully transparent, it uses the same clients as always. The only difference is that the clients should be configured the correct server (is some clients are used; of course, if you use nothing but curl, you change nothing but the name of the server in the query):
In this query, you ask the
cheat.my
server for thesecret
cheat sheet.The main advantage of this mode is that you can have your own (private or maybe public but relevant only to you and to your team) cheat sheets, and at the same time, you can use the global cheat sheets to, without changing anything.
This issue is related to #5, #14, #97
To do:
The text was updated successfully, but these errors were encountered: