How to use bookdown.org with github? [closed] - github

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am trying to create a book on Github and honestly I don't have the time to learn how to code and dig into all the new terminology/technology and learn the in and outs of Github as it's really not user-friendly.
All the tutorials are too dense and not suited for beginners. I just want to generate content for my book. How can I do this? I'm pretty good at just taking a template and adapting it to my needs, but I can't even get a template to work.
I've installed the bookdown package in R and have opened up the sample book in R. How do I get this sample book onto Github website? I just uploaded all the files and when I go to my website, it just takes me to README.md
I am using Github through my browser and don't plan on installing whatever Github software there is and all that kind of stuff. I really don't have time to dig into how to use Github. So any tutorial will require me using Github through the browser.
When writing content for my book, is there a way to do it on the Github, or is doing it in Rstudio the easiest way?
I don't have much desire to upload my book to bookdown.org. Can I still build my website on github?
Do I need to convert Rmd files to md files? How do I do that?
There are plenty of books out there on Github (bookdown.org show cases many). I believe you are able to view the files/code and what not on Github, so it may be pretty easy to just grab a couple necessary files there. I don't know which ones are important, and even if I did, I don't know how to get it to work with my Github.

You can fork the rstudio/bookdown-demo and make it your own GitHub repository.
From there, follow yihui/bookdown/get-started.html, with, at a minimum:
Download the GitHub repository https://github.com/rstudio/bookdown-demo as a Zip file, then unzip it locally.
So no need for "Git/GitHub software" there.
Install the RStudio IDE. Note that you need a version higher than 1.0.0. Please download the latest version if your RStudio version is lower than 1.0.0.
Install the R package bookdown:
# stable version on CRAN
install.packages('bookdown')
# or development version on GitHub
# devtools::install_github('rstudio/bookdown')
Open the bookdown-demo repository you downloaded in RStudio by clicking bookdown-demo.Rproj.
Open the R Markdown file index.Rmd and click the button Build Book on the Build tab of RStudio.
Try that with a minimal example like yihui/bookdown-minimal

Related

Program for getting and uploading latest version of a project? [duplicate]

This question already has answers here:
How to use Git for Unity3D source control?
(18 answers)
Closed 5 years ago.
I am working with a team of friends on a couple Unity3D projects.
I was wondering if there is some kind of program we can use to upload a version of our project (example: "Game1 v1.0") and then either one of us can download that version, edit it, rename the version (example "Game1 v2.0") and then reupload the updated version with the program just adding or changing the edited files and not the whole project to save time.
I hope I was clear enough on my description.
Is there some kind of a program that can help me with this problem?
Always use Git or Mercurial when working on something (even if alone).
If you want a GUI frontend, use SourceTree and BitBucket for repos (GitHub offers only public repos for free).

What is the best way to publish a programming tutorial on Github? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I would like to publish a series of programming tutorials along with some code on github. The tutorials will be written in markdown. There will be several markdown documents with references to each other.
Now I wonder what would be the best option:
Put plain markdown files into the repository, together with the code
Use the github wiki for the tutorials and link to the code
Use github pages (e.g. with jekyll) for the tutorials and link to the code
I am not very familiar with github pages nor with the github wiki, so any hint about (dis)advantages in this context is helpful!
You have mentioned three different ways you can go about doing this, I'll elaborate on each of them...
Markdown files in repository
This method isn't actually too bad, because its possible for people to contribute to it as long as they know Markdown (and Markdown is very easy to learn anyway) as they simply need to send off a pull request after forking your repository. Also, since Github uses something called Github Flavored Markdown you can embed the code directly into each file and have some nice looking syntax highlighting.
Github Wiki
Using the Github wiki is a feasible option because it will make it easy for other people to contribute to it. However, you may prefer to have changes made by other people on a approval type system, this is when you'd go with the first option because of the pull requests feature. I personally wouldn't recommend that you use the wiki purely because it undermines the Github repository itself (having an empty repository with heaps in the wiki). This is just my personal opinion though.
Github Pages generator
You could use the Github Pages generator and make a website using that. However I would like to point out that it uses Jekyll to generate the site, and that the generator will only create one page automatically, the rest of the pages will be up to you to make using Markdown and a bit of HTML. It will look nicer, but it will be much more time consuming.
My personal recommendation
I recommend that you have the tutorial itself hosted in a Github repository written in Markdown, and then you can create a page using the page generator that will link to all of the parts of the tutorial (acting as a landing page)

Auditing / searching private Github repositories for specific code [closed]

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 10 years ago.
Improve this question
Google Maps v2 is being retired, so I need to audit all our private repositories on Github for uses of it. I could clone them all down and run a grep, but there are a lot (mid 3 figures) so I’d rather do everything on the server if possible. Unfortunately Github’s search will only search public projects (as far as I can see), and I can’t see anything in the API to do what I want.
Any ideas?
Note that there already is a feature to grep code from private GitHub repos:
However, it has no API, so you'd need to do some good old scraping of links with the format:
https://github.com/creaktive/WUB/search?q=BEGIN&choice=code&l=&start=
To walk multiple repos, you could use iMacros for Chrome/Firefox, WWW::Mechanize if you're up to some Perl-fu, or PhantomJS if you're a JavaScript ninja.
If you know you're looking for patterns that are more or less consistent you can use the Github API to grep only the files that might be of interest to you.
For instance, you can get the contents of a file via the API: http://developer.github.com/v3/repos/contents/#get-contents
However, this assumes you know what files you've got (works well for Gemfile in Ruby, or requirements.txt in Python, not so great for Javascript).
The other option is to automate the search of the repos locally. It would be perfectly possible to write a script to git clone each repo in turn, grep it, and output the results (assuming you've got the time required for this to run, and the disk space).
I have seen a previous use of OpenGrok and typically has usecases such as yours.

What's a good strategy for an open source project to not share production settings? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm currently looking to release an MVC / RavenDB as an open source repository mostly just to let people look around rather than as a full on project.
However I don't want certain production settings such as SMTP Server details and Connection Strings publicly exposed (but still under source control).
I'm looking for suggestions on how I should structure public and private repositories so that I can easily work on the project and have reasonably hassle free deployment.
Cheers
In cases similar to yours where I need to publish parts publicly and keep import data hidden, I usually very simply keep a branch only for production.
In your case, you could either make the dev branch where you publishing everything open source, clone it and receive some contributions from other people. Then have a production branch somewhere different. (heroku..)
You normally don't put those files under version control. Inside a company, say, you can put a template under version control and ask your developers to copy it into place and update as necessary. Like a config.ini.template file with
[smtp]
host = smtp.company.com
user = USERNAME # update this
pass = PASSWORD # and this
where it's clear that the developers need to update the credentials when they rename it to config.ini. The config.ini file should then be excluded from version control.
For an open source project I would probably not put any template under version control. I would still configure it so that the config.ini file is excluded from version control so that I can have my own config.ini file in my working copy without committing it by accident.
I find the above system much easier than putting the real config files under version control. Even if I can put it in a private branch of some sort, then it will require me to constantly merge with that branch and I'll have to be careful not to accidentally push the config file to another repository.

Google code or GitHub for project hosting? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is Google code similar to Github where you can put your source code for collaboration?
Which is the de-facto SCM it's using?
And which one is recommended for project hosting?
Update 2013:
All major repo hosting services supports git, and supports smart https access (see below):
code.google.com (with cases like this one, July 2011)
bitbucket.org
tfs.visualstudio.com (!, as explained by Scott Hanselman)
Currently (July 2013), the main difference (between GitHub and other services) is in term of release management, more specifically:
integration with Travis CI (continuous integration, possible more or less with all services)
release artifacts: See "GitHub Release Your Software (July, 2d 2013)":
The ability to associate to a tag up to 100MB of binaries.
Initial answer (September 2010)
One big difference is the support by GitHub for smart http, as explained in the ProGit "smart http" section, supported since April 2010.
Being behind a firewall at work, that is more than useful to actually push anything to the remote repo!
I don't think "Google Code" support it officially, even though some contributors try to push that feature.
Yes, they are similar but support different versioning systems. Also the collaboration style is different. While Github (and Launchpad and BitBucket and all the other DVCS hosters) focus more on active collaboration between forked projects, Google Code's primary way of collaboration is through tickets.
So none of them is per-se better than the other, but perhaps fits your project management and contribution/collaboration style better. The whole debate between centralized and decentralized code versioning systems is related to that.
Some features that you should consider:
Open source:
Google: Always open source.
Git: Open source for free account, but you can pay to switch to close source.
VCS: Both google & github support Git (and others)
Wiki: Google wiki is poorly supported, unless you love to write with wiki tags. You can find many project in Google project hosting has there wiki in Git hub.
Statitstics: Github provides many nice statistics chart, while Google provides only a list of updates
Git:
Google:
AFAIK Google code is yet to support git natively. At least as far as I can tell by the comments on the ticket open for this.
So if you are using or would like to use Git then Github will be naturally more suitable.
On the other hand if you are using SVN and would like to continue to then Google code might be a more natural fit.
I have found Github projects easier to set up and get going but that is fairly subjective. Some of my friends also claim that Github's support/ecosystem is better than Google's.
Use GitHub. GitHub gives each account its own namespace for project names, so you don't have to worry about your project names having already been taken by people's projects. If you're using Google Code, however, then you do have to worry about this.
If you need private repos, you won't get that with Google Code. At least not yet; see this open issue: http://code.google.com/p/support/issues/detail?id=1829