Friday·15·October·2010
Thoughts on Gitorious and GitHub plus a useful git hook //at 11:36 //by abe
When I took over the developement of xen-tools, I looked around for an appropriate git hosting. I especially had a look at GitHub and Gitorious.
If you just regard the features, GitHub is definitely more targetted on single developers and Gitorious more towards projects:
At GitHub, every repository has its URL under the URL of a user page which makes it nearly impossible to have user independent, “official” repositories for projects which have more than one official developer.
At Gitorious, every hosted repository needs to belong to a project, even if it’s only a published configuration. But a project can have more than one git repository. You only seem to be able to have personal repositories if you clone some existing Gitorious repository.
So from a feature point of view, the xen-tools git repositories fit way better to Gitorious’ hosting while the git repositories with zshrc, conkerorrc and desktop configuration files defintely have a more fitting addresses on GitHub, in my case http://github.com/xtaran/$repository. On Gitorious, they are now together under a “project” called “Axel’s configuration files” at http://gitorious.org/abe which contains git repositories of my on grml’s .zshrc based .zshrc, my configuration for Conkeror and all the files necessary for my ratpoison/xmobar based netbook/laptop desktop.
I though feel a little bad for giving the project the very short “slug” name “abe” instead of “abe-config” (as I did initially) since “abe” is IMHO not a proper “project name” for my configuration files and possibly other projects would have a more reasonable claim for that project name on Gitorious. But that way it suites more its purpose: Gather some of my git repositories which don’t belong to a proper project.
But there’s another important point when comparing Gitorious and GitHub: Free Software needs free tools as Benjamin Mako Hill posted recently on Planet Debian. Despite my (probably well known) distrust against Google and therefore also Google Code, and despite knowing the history of SourceForge becoming non-free, I was not that much aware that GitHub’s software is only partially open source and therefore also not free software while Gitorious is both as it’s licensed under the GNU Affero General Public License (like StatusNet/identi.ca for example) which is basically GPLv3, but its ideas applied to hosted web applications scenario (where the GPL itself doesn’t grasp), too.
Initially I just had the xen-tools git repositories on Gitorious and all my small one-repository “projects” as copies of the repositories on my own git server on GitHub to get some more publicity for them and allow “social cloning”. After reading Mako’s article, I decided to at least have repository clones on Gitorious of all repositories I mirror at GitHub, too.
That way I force nobody to use the non-free tools on GitHub for
“social cloning” one of my git repositories. And of course I have
copies of my code somewhere on the net as backup. Or to say it with
Linus Torvalds’ (slightly updated) words: Only wimps use tape
backup: real men just upload their important stuff on git, and let the
rest of the world clone it.
;-)
But isn’t that tedious to always push your code to three repositories?
No, it isn’t. I just push my code to git.noone.org where I have configured the according remotes and
the following post-receive
hook:
#!/bin/sh read oldrev newrev refname git push gitorious ${refname:t} git push github ${refname:t}
The only other thing necessary is to use ssh-agent and SSH agent
forwarding to at least the host you’re pushing to.
Tagged as: .zshrc, abe, Agent Forwarding, AGPL, Conkeror, Free Software, git, GitHub, Gitorious, gitweb, Google, Google Code, GPL, grml, Hook, Hosting, identi.ca, Linus Torvalds, mako, non-free, Open Source, Planet Debian, Ratpoison, Real Man, Social Coding, Social Networking, SourceForge, SSH, ssh-agent, StatusNet, xen-tools, zsh
// show without comments // write a comment
Related stories
Wednesday·04·November·2009
192.168.noone.org //at 10:48 //by abe
About a year ago, Eric Poscher invented the IP address blog and installed his one at http://192.168.epe.at/. Every hour his netbook notes down the IP address of the interface which currenntly the default route goes through and if it has an internet connection, it uploads the list of IP adresses it had. Additionally, he filters the list to IP addresses in 192.168.0.0/16.
June this year he published the source code behind his IP blog under GPL and Creative Commons. I modified his script slighty to just write down the new IP address if it’s different to the previous one, but without any filter. This makes the list much more colorful (and my online times less traceable :-) as you can see at http://192.168.noone.org/.
But the biggest disadvantage of Eric’s code design is not the fact that it’s a (quite nice to read :-) shell script but that it doesn’t save the list of IPs separately and is not able to regenerate everything if you want to change the design, but always just adds a line to the HTML page.
So I rewrote the whole thing in Perl last Saturday while sitting the dog of my parents. If you change the templates and call the script again, it regenerates the whole list with the new templates. The code is also under GPL, the HTML parts are under Creative Commons, too.
And hey, this is one of the very few (if not only) applications which
are much more fun with IPv4 than with IPv6. ;-)
Tagged as: 192.168.epe.at, 192.168.noone.org, art, Blogging, Creative Commons, epe, git-repo, GPL, IPv4, Network, Perl
// show without comments // write a comment
Related stories
Saturday·11·March·2006
Blosxom Plugin Tagging Version 0.02: New Features //at 19:17 //by abe
Just hacked a few new features for my Blosxom plugin Tagging. It now shows you how many times you’ve used that tag. The number is always shown as title attribute to the link, but can optionally also be shown in parentheses behind the tag name or by the (CSS based) font size and/or color (start and end sizes/colors configurable). Also some default values changed (to my current configuration :-).
I saw that font size feature quite often during the last weeks and I liked it. I first tried to figure out, which system offers that feature and found that at least Serendipity’s freetag plugin offers it, but didn’t want to download Serendipity just for the plugin. So I decided, the algorithm for calculating the font sizes shouldn’t be that hard to find and coded it from scratch by my own. :-)
And while coding it I noticed that changing the color instead of the font size could be done the same way and that this feature isn’t much more difficult. So I implemented it, too.
Another new feature is that you now can configure the minimum number of postings a tag should have to show up in the list of tags.
The result can be seen in my blog on the right side under “Tag cloud”.
Now playing: Falco — Der Kommissar
Tagged as: Blogging, Blosxom, Blosxom Plugin, CSS, GPL, Hacks, Now Playing, Open Source, Other Blogs, Perl, Tag Cloud, Tagging
// show without comments // write a comment
Related stories
Friday·10·March·2006
Tagging with Technorati style in pure Blosxom //at 03:22 //by abe
Short summary: I can’t stay away from coding Blosxom plugins. Perl rules. PHP sucks. ;-)
- New version 0.04 of the tagging plugin, supporting Technorati style tag links to many resources.
- New add-on plugin pathbasedtagging to the plugin tagging, implementing Technorati style tag links in pure Blosxom without any help from Apache’s mod_rewrite.
- New plugin dept offering Slashdot like “dept.” lines for Blosxom postings.
Supporting Technorati style tag URLs
After releasing the last version of my Blosxom plugin tagging, I
noticed that Technorati only seems to like URLs ending in
“/tagname
” but not ending in “=tagname
” (as
they do if you use classic query strings instead of the path info),
even if the a
tag has a rel="tag"
attribute. And not only I noticed this but also some other users of
the plugin. (Although I do wonder how Furl made it to a Technorati
partner with URLs like http://www.furl.net/furled.jsp?topic=tags…)
So I somehow had to change the syntax style for my tags. This wasn’t very hard for the links, but I wanted them to still link to my blog and not to Technorati, Flickr, Wikipedia or any other external resource.
Implementing Technorati style tag URLs
The obviously easiest solution for someone who’s using and administrating Apache web servers for nearly ten years now was to use some mod_voodoo—eh—mod_rewrite:
RewriteEngine On RewriteRule ^/cgi-bin/blosxom.cgi/tags/(.*)$ /cgi-bin/blosxom.cgi?-tags=$1 [PT]
That way I could use Technorati style tags and had a well performing solution. But somehow this solution wasn’t that satisfying since it wasn’t pure Blosxom and therefore had some dependency including access to some Apache config file. (Even if the config file was called .htaccess. ;-)
A pure Blosxom solution
A few days ago I somehow noticed that in general a special behaviour
on some URLs could also be implemented using Blosxom’s API. Using the
entries
function to modify the Blosxom internal path
itself before Blosxom or e.g. the entries_index runs but not returning
any hashes, allows to have some path like URLs not being treated as a
path by Blosxom.
Unfortunately this couldn’t be incorporated into the tagging plugin
itself, since plugins doing such path interpreting voodoo needs to be
ran before any plugin supplying an entries
function
runs. But the tagging plugin must run after such a plugin. So I
created the small add-on plugin
pathbasedtagging which is solely thought for use together with the
tagging plugin (but may have other, yet unknown purposes).
And since I got asked if they could use the tagging plugin to link to external tag URLs instead of the own blog, I included a ready to use list of more or less popular external tag URLs including Technorati, Flickr, del.icio.us, de.lirio.us and Wikipedia.
from the slashdot dept.
Since I’ve always liked the often sarcastic or even evil comments inside Slashdot’s subtitle alike dept. lines and since I’m also used to use them at Symlink, I wanted them in my blog, too. Time for a new plugin.
The basic work of parsing out the data from the text files the posts reside in was already written for the tagging plugin. So I just had to use that code, simplify it and add some little more code to get the dept plugin whose results you can see in my blog directly beneath the title of a posting since a few days now.
Update 02:52h
Hey, see my Technorati
profile: It worked! Technorati recognised the tags! Yeah!
Tagged as: Apache, Blogging, Blosxom, Blosxom Plugin, Dept, GPL, Hacks, HTML, mod_voodoo, Open Source, pathbasedtagging, Perl, Slashdot, Symlink, Tagging, Technorati, Wikipedia
// show without comments // write a comment
Related stories
Tuesday·07·March·2006
Blosxom plugin multcat released //at 19:58 //by abe
I like the idea of categorising blog posts and I like blosxom, but blosxom doesn’t allow you that one post belongs to several topics on different branches of the topic tree. And since there doesn’t seem to be a plugin providing such a feature — even not after looking through the blosxom plugin repository for the third time — I wrote it by my own…
So here is the blosxom plugin multcat, version 0.01. License is GPL v2 or higher.
multcat allows you to have postings in multiple categories by setting
appropriate symbolic links without having them multiple times on the
main page (or any category’s page which includes at least two
categories, the posting appears in). It is designed to work together
with categorytree, which still counts all occurrences of a posting.
Tagged as: Blogging, Blosxom, Blosxom Plugin, GPL, Hacks, multcat, Open Source, Perl
// show without comments // write a comment
Related stories
Thursday·02·March·2006
Blosxom plugin tagging released //at 02:22 //by abe
I like the idea of categorising blog posts and I like blosxom, but even with multcat adding a post to multiple categories is somehow limited. In other blogs I often saw the technic of tagging articles with a keyword. I wanted that feature, too, but there weren’t any appropriate plugin for blosxom. Until now, because again, I just wrote it by my own…
So here is the blosxom plugin tagging, version 0.01. License is GPL v2 or higher.
tagging expects one or more “header” lines starting with “Tags: ” and being located directly under the first line, which always is the title. Those lines you can fill with comma seperated keywords (seperation by blanks possible via config) and shows them with appropriate links in $tagging::tag_list for the story template and $tagging::global_tag_list with all used keywords for the head or foot template.
Filtering is done using the -tags
parameter in the query
string. It uses the same delimiter as configured for the Tag header
lines inside the posts.
Tagged as: Blogging, Blosxom, Blosxom Plugin, GPL, Hacks, Open Source, Perl, Tagging
// show without comments // write a comment
Related stories
Blosxom Plugin Tagging Version 0.03: Featuring related stories //at 02:08 //by abe
Wim de Jonge, an (as he writes) happy user of my blosxom plugin “tagging” asked, if the tags used in the plugin couldn’t be used to find related stories by looking for stories which share a number of tags with the current story.
Version 0.03 of tagging is the result of his suggestion. You can see in my blog how it looks like.
He also found a division by zero bug in the plugin which happend if there were only a few posts in a blog and therefore all tags only occurred once. This bug should be fixed now, too.
Now playing: Toto — Africa
Update 14:50h: Released version 0.03.1 as a bugfix releases
since there was a slash missing in the related story links and some
minor issues. Thanks again Wim for pointing out the error.
Tagged as: Blogging, Blosxom, Blosxom Plugin, Division by Zero, GPL, Hacks, Now Playing, Open Source, Other Blogs, Perl, Tagging
// show without comments // write a comment