- 1 Source Code hosting
- 2 Code Snippet Hosting
- 3 Source Code Embedding
- 4 See Also
- 5 Brainstorming
Source Code hosting
- POSSE copy: https://github.com/cweiske, pushed onto github via a dedicated user: https://github.com/cweiske-mirror?tab=activity
On indieweb server:
$ git init --bare project.git $ cd project.git $ git remote add github firstname.lastname@example.org:cweiske/project.git $ git config remote.github.mirror true
On Github, add the mirror user as collaborator for the project. Now test it:
$ cd /path/to/project.git $ git push github
If that works, the post-receive hook can be setup:
$ printf '#!/bin/sh\ngit push --quiet github\n' > hooks/post-receive $ chmod +x hooks/post-receive
This force-pushes the code got github, which means any changes on github that are not on my server get overwritten. Thus cannot use the merge button on github, but have to merge manually.
Tantek Çelik manually hosts the latest live version of CASSIS at: http://tantek.com/cassis.js (without revision control) and manually POSSEs it to https://github.com/tantek/cassis/blob/master/cassis.js (with revision history) since YYYY-MM-DD.
- Some of these projects are shared with a few other people who are able to log in and contribute.
- All Aaron's public code is on GitHub, because it makes it easier to share and get contributions from others.
Dmitri Shuralyov hosts Go packages created after 2017-09-13 on his personal website. His website is a custom Go package host, written in Go and fully open-source, implementing features such as git repository serving, issue tracking, notifications, history viewing, etc.
Software you can use to host your own Git repository:
- GitWeb - https://git.wiki.kernel.org/index.php/Gitweb
- GitLab - https://www.gitlab.com/
- GitPHP - http://www.gitphp.org/
- Gogs - https://gogs.io/
Code Snippet Hosting
Source Code Embedding
Differences between pastebin views and embeds
It can be necessary to have different markup for embedded source code and the source code display in the pastebin tool.
Use case: Work with and modify the paste. Single files have edit and "raw" view buttons, maybe more. File names are important and are shown before the code itself.
Use case: Show a bit of colorful source code, but don't get in the way. No edit buttons. File names are unimportant, so show them after the code.
Cweiske.de 13:00, 20 March 2014 (PDT)
Instead of the usual "fork me on github" buttons, projects should use a more general "fork me" button.
It should fork the code onto the user's preferred git server instead of a silo. The button could either work like subtome, showing a list of services that support remote forking, or simply use a custom protocol like "web+fork://" that web sites can register itself as HTML5 protocol handler.
The URL syntax could be like the feed uri syntax:
The linked URL could be the homepage of the project, with embedded rel-vcs links that provide the git:// or http:// URLs to the git repository. Or it could be the git repository URL itself. phorkie supports remote forking via rel-vcs since version 0.3.1. See the blog post for a description of the process.