gist

Create new gist with Github API v3 using curl

跟風遠走 提交于 2019-12-21 05:04:26
问题 After fighting for quite some time for posting a private gist to Github using their API V3 I almost gave up. Almost. May be some one have also faced similar problem or know what might be the reasoning of the following behavior: Right now the curl command looks like following: curl -H "Authorization: bearer MY_AUTHORIZATION_TOKE" -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"public":false,"files":{"test.txt":{"content":"String file contents"}}}' https://api

Upload a file to a Gist with bash

别说谁变了你拦得住时间么 提交于 2019-12-20 09:47:13
问题 I usually paste error reports and logs on Gist at Github, to exchange programming relevant debug information. Gist doesn't have a button to upload a file. So sometimes it is not so convenient to copy and paste your large errorreports into gists textarea for input. Is there a way to upload a file from the commandline into a new Gist in your Gist account? also creating a temporary git repository for the file to upload would help, I would automate this in a script then. In the end I would like

Fork Gist to Repo on GitHub

北城以北 提交于 2019-12-18 03:48:42
问题 I have a bunch of templates I made in Gist form so people can discuss them at the bottom. We like to copy these files and paste them into a repo and make an addon there. Is it possible to fork a Gist to Repo via the GitHub site or client? If not either of those two, can it be done via shell? 回答1: New Correct Answer Yes, directly! Go to https://github.com/new/import and put in the URL of your gist and a name for your new repo. I just put in https://gist.github.com/RichardBronosky

Transfer gist repo to github

五迷三道 提交于 2019-12-17 15:22:14
问题 I am working on a small project with gist and since it is growing I would like to put it on github. Let's suppose that: my gist repo is at: https://gist.github.com/1234 my new (empty) repo is at: https://github.com/ChrisJamesC/myNewProject The ideal solution would be one that pushes my changes on both the gist and the github repository. 回答1: Github now has a new feature - import from another repository. So the steps are much simplified: Use the import feature and specify the URL of the

How to execute chsh using a bash script I put up in github?

喜欢而已 提交于 2019-12-14 01:55:20
问题 I have a gist that I always use to install the packages I need on a fresh server. http://gist.github.com/4372049 All I need to do is to type the following in the fresh server via ssh bash -c "$(curl -fsSL https://raw.github.com/gist/4372049)" <mysqlPassword> I will be good to go. Now I have this series of steps I always need to perform on a fresh installation of ubuntu. first at root i did a echo $SHELL I saw that I have /bin/bash then i switch to www-data sudo su www-data then i do a echo

Search gist comments?

百般思念 提交于 2019-12-13 03:55:19
问题 I'm attempting to look at GitHub-hosted Gists on which I made comments in case there has been any further follow-up (in the form of comments) from the author or any other users. Ideally I'd also like to see any gists that were modified after I commented as well. I had not starred the Gists at the time that the comment was made, so I can't simply iterate through them that way. The About page says "You can also search gists by language with Gist Search. Gist search uses the same search syntax

How do I get source code out of a gist? [closed]

你说的曾经没有我的故事 提交于 2019-12-11 19:59:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . How do I get source code out of a gist? These are supposed to be like git repositories, but git clone GIST.gist did not work. I can't find anything resembling a command line option that unzips or otherwise turns these things into source code file(s). edit: I was given a .gist file, this is what needs to be

What are the green and red gems beside Github Gist Revisions

社会主义新天地 提交于 2019-12-10 12:31:58
问题 I have just started to use Github and have been doing some tests with Gist, I notice beside each revision there are little green and red dots of varying amounts. Does anyone know what they are? The following image, for example, is captured from this gist. 回答1: Those red and green dots represent insertions and deletions in the revision, respectively. There is something similar associated with commits on GitHub (actually, you see the same information when committing in Git), except there you

How to embed only certain lines from a gist?

試著忘記壹切 提交于 2019-12-09 05:07:22
问题 Gist lets you embed a gist in a web page: <script src="https://gist.github.com/dyoo/4627246.js"></script> I was hoping I could have it display just a line range subset. (Use case: Write some code for a blog post in a single gist. Reference certain lines throughout the blog post discussing those lines.) Is this possible? I can't find it documented, but is there some way to do it? As an example of how I thought it might work, GitHub supports URIs with line numbers. For example, the #L4-L8

Is there a way to specify the width of an embedded gist?

有些话、适合烂在心里 提交于 2019-12-06 11:08:05
I am trying to embed a gist into a webpage. Take the gist below as an example: <script src="https://gist.github.com/Astr0surf3r/5208714.js"></script> I wonder if there is a way to set the width of the gist. For example, I would like to to make the gist narrower than the default width. You can control the width by modifying the CSS class that this gist is using. .gist { width: 250px; } Example: http://jsfiddle.net/aFwEd/ 来源: https://stackoverflow.com/questions/15535272/is-there-a-way-to-specify-the-width-of-an-embedded-gist