Skip to content
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

please refresh from chrisallenlane/cheat #127

Closed
gitstupid opened this issue Feb 15, 2019 · 8 comments

Comments

@gitstupid
Copy link

@gitstupid gitstupid commented Feb 15, 2019

Hi there,

it would be great if you update your http://cheat.sh/ from chrisallenlane/cheat https://github.com/cheat/cheat. There are some newer and better cheatsheets (for eg radare2/r2, youtube-dl, socat)...

have a nice weekend

@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Feb 17, 2019

@gitstupid Thank you for updating me!

Actually, the local copy of the cheat repository should update automatically by cheat.sh;
@chrisallenlane even configured a hook for that in cheat/cheat, this feature is switched off currently because of some bugs in it (and I was totally busy with other projects so I didn't fix it still; it will be done soon).

I've updated the cheat repository manually (but the r2 cheat sheet is currently not available because of a minor bug in cheat; it crashes when it is detached from the terminal when showing cheat sheets with Unicode; it is exactly the casehere). I will ping @chrisallenlane regarding this

@gitstupid

This comment has been minimized.

Copy link
Author

@gitstupid gitstupid commented Feb 18, 2019

I've updated the cheat repository manually
so perhaps you see that the @chrisallenlane sheets more extensive, if you want so i will support you with a list of worthwhile substitutions...

@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Jun 27, 2019

It is being updated automatically (each hour) in the new cheat.sh version (deployed on the server).
Will be possible to update in real time soon.

@chubin chubin closed this Jun 27, 2019
@chrisallenlane

This comment has been minimized.

Copy link

@chrisallenlane chrisallenlane commented Oct 20, 2019

@chubin

Apologies for resurrecting a dead ticket here.

FYI, I just released a new version of cheat moments ago (a re-write entirely in Go), which externalized the cheatsheets from the cheat executable repository. That said, the hook may be broken now.

Fortunately, it shouldn't be necessary at this point. The cheatsheets are now hosted in their own repository here:

https://github.com/cheat/cheatsheets

You are, of course, welcome to use them!

@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Oct 20, 2019

@chrisallenlane Chris, is it right that the format of the cheat sheets was not changed, and I should only change its url?

@chrisallenlane

This comment has been minimized.

Copy link

@chrisallenlane chrisallenlane commented Oct 20, 2019

@chubin - oh, good point. I didn't think about that.

Some of the cheatsheets now have a "front-matter" header, which can be used to specify which syntax the sheets contain. (This is used for syntax-highlighting purposes.) The front-matter can also associate tags with a sheet.

Here's an example of a sheet with front-matter:
https://github.com/cheat/cheatsheets/blob/3b5f3db283020f9e601da69f7722db7a53625744/tar#L1-L3

Here's some background on the front-matter concept in general, if you're unfamiliar with it:
https://jekyllrb.com/docs/front-matter/

So: the cheats are still plaintext, but some may display front-matter if you don't parse it out. The front-matter should be relatively straightforward to parse out, though, if you don't want it.

Sorry if I've created a headache for you!

FWIW, I also created a cheat-python branch that contains the old cheat code, which itself contains the cheatsheets. I'm not going to be updating that branch much going forward, though, so that content will eventually go out-of-date. That said, it's available as a stop-gap if you need it, I guess.

How much complexity do these changes add on your end? Just shout if I can help somehow.

@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Oct 20, 2019

@chrisallenlane Actually, it should not be too much work on my side; and the front-matter concept seems to be really cool thing indeed! I was not aware of it, so I used external files instead, and that annoyed me. For the beginning, I will simply cut it out,but in future it would be great use its data, such as tags etc. I will try do it first and then let you know here whether I managed to do it, and whether some help is needed. Thank you for updating me + offering your help!

@chrisallenlane

This comment has been minimized.

Copy link

@chrisallenlane chrisallenlane commented Oct 20, 2019

Sounds great, @chubin 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.