-
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
Server producing: "Unknown Cheat Sheet" for sql and psql queries. #276
Comments
I acknowledge it. I will investigate |
Your server code behind http://cheat.sh/python/print+max If you gzip all your code server side and send it to me, I'll fix it, and also replicate a fail-over server between dns and the ip address. :-DD |
Eric, hi! Please test, it should work now. It is a little bit more complicated; there are some old proprietary parts in use, which I gradually rewrite and publish, but the process is not yet finished. As soon as it is fully rewritten and published, I would be glad if you would host a cheat.sh mirror. The service works again; could you please test? |
Yep all the above is working again. If you need paper claims on labor to keep this project alive, post a donation link. |
Not a bad idea. Although I am not sure if any donation stream is enough for fund any development of open source project. |
@abitrolly The server-side query filling component of this cheat.sh open source project that touches |
@sentientmachine Eric, what do you think, what would be a reasonable monthly donation from your point of view? $1/monthly or $5? Now serious questions: thank you for the gif, your workflow looks pretty cool. The question is what is your hit-rate when you work like this? It is clear that if someone is querying for trivial things like I see that you didn't disable comments, and you fetch answers with them What improvements of cheat.sh would you like to see first of all? Increasing stability? Better hit-rate? Standalone mode? What else? |
When the coding focus freight train is ahead-full, my cht.sh hit rate is 5 or 10 times per hour, but that's at most once every few days. $100 USD per year is reasonable to me for you to do the bare minimum to keep this project on. I'd like faster turn around times, sometimes I'm waiting up to 3 seconds for a response and that needs to be 2 or 1 second. If you make another URL where I have to submit a username and password, like this: If I get a response from cht.sh and it's not what I want, I'll put The default auto-commenting feature is super good for the user's commentary, leave that on. One thing that happens I don't like is like what happens when I search for python/basename Looking like this to me (Grey Underlines in comments just mean those are snippet names) https://imgur.com/a/JZ9sJGH Your service has stripped the backticks from the stackoverflow post, making the user comments flow right into the code which is always a face palm show stopper. I'd prefer the backticks remain and at least I can overlay an: "If we're in a snippet, cht sheet, highlight those appropriately." Heck even replacing the backticks with newlines would be better. If the stackoverflow answer contains no code example I don't want to see it. Also something we talked about 3 to 6 months ago which was super-cool someday maybe, I'd like to be able to filter answer by of conditions, like for example: "If you don't have at least 14500 reputation on stackoverflow, OR otherwise if your answer doesn't have at least 4 upvotes, then I do not want to be presented with this answer. psql usage example has been perfect, no need to change comments there: https://imgur.com/a/FnZwm32 |
You mean, distinguish between free and premium users,
Yes, Markdown rendering should be fixed; absolutely agree here
Yes, this is a good feature too.
Yes, it sound interesting, but here two questions arise:
|
Moneywise: I just want the project's server side to stay up for the next 15 years even after you lose interest and find more important and fun things to do: server costs and code maintenance costs are substantial so altruism has its limits. Stackoverflow's question API might have an option for you to send a flag to 'give raw markup sequences' including inline backtics for code sequences and like bold, headers, italics and links, images, references etc. https://stackoverflow.com/a/22272009/445131 If it's easy to make a flag to curl, so I can say: The filter by stackoverflow metadata question/answer conditions is a big ask, probably requiring total rewrite. I'd send an optional json string to curl in the curl post with conditions, and you'd have to untangle it and relay to the database for filtering. What would be super cool is conditions for: "The answer must be written by someone with at least 14000 or more reputation, or failing that, the answer must have 3 or more upvotes, also the answer should have at least 1 line of code in it matching the language that I'm searching on." All this sounds like 40 hours of programmer time. Backtics seem to come through on this example if the markup character is inside another kind of markup like a comment or a list item: |
I agree with you, and see it the same. I think the most crucial component, needed for this,
Sure, we even fetch this data in Markdown format; it is just a bug in markdwon rendering
It is not a trivial change, but it is feasible, I believe.
I meant, how exactly should the query look like in this case?
something like this? |
That would be perfect: Those conditions make more work for the server side since remembered query-to-cache hits are less frequent. Also what about the situation where the criteria is too restrictive and there's no match? I'd say if there's no matches with criteria, just fail over and give the match without any criteria. I just want to see the answer from the high reputation user first, or a highly upvoted post first, before seeing some pile of poo laid by a zero-reputation user writing a paragraph with no upvotes and no code in the answer. Your code mirrors Stackoverflow's ideology of always picking the green-Checkmark'ed answer as the best answer. But if there's a 144k rep user down below with a 200+ upvotes with code in it, and the checkmarked answer is some 5k reputation user with no code in it, and only 3 upvotes, I don't want to burn precious seconds reading their low value glyphs into my brain. The reason I was suggesting users passing you a block of JSON, is because there's a lot more fields I could filter down by, for example: https://data.stackexchange.com/stackoverflow/query/edit/1401745 But again you have to be careful since Stackoverflow's data in table Keeping the service on the down-low and only for high-rep users such as myself who contribute a lot, well an argument can be made for synergizing core competencies. |
I'm seeing non-response from your server when searching for /sql/ or /psql/ anything, it produces:
All of these produce the above Unknown Cheat Sheet response in browser:
http://cht.sh/psql/select+from
http://cht.sh/psql/rename+table
http://cht.sh/psql/from%20table
http://cht.sh/psql/renametable
http://cht.sh/psql/rename
http://cht.sh/psql/table%20statement
http://cht.sh/psql/table+rename
http://cht.sh/psql/table+foobar
http://cht.sh/psql/table+alter
http://cht.sh/psql/table+statement
Problem also occurs with other languages 'r' and 'sql':
http://cht.sh/sql/table+statement
http://cht.sh/sql/select+from
http://cheat.sh/r/vector+permutation
http://cheat.sh/r/write+file
problem also happens with curl
Issue 195 was the same problem:
The example octave queries named there are producing no response, suggesting this problem affects many languages.
#195
The text was updated successfully, but these errors were encountered: