Dulwich – a native python way to access Git repositories

Ever wanted to manipulate Git repositories directly in python? Well, okay… I haven’t really myself, but in writing about Google Code’s support for git yesterday, I noticed that they are using Dulwich, a native python implementation of git. Rather than wrapping command-line git with python scripts, Dulwich is a python module giving you direct access to a git repository. As shown in the Dulwich tutorial, creating a new repo is simply this:

>>> from dulwich.repo import Repo
>>> from os import mkdir
>>> mkdir("myrepo")
>>> repo = Repo.init("myrepo")
>>> repo
<Repo at 'myrepo'>

Once a repo is created (or you connect to an existing repo), you can do what you would do with git at the command line: adding files to the repo, committing files, and changing files.

While I don’t know that I personally will use this… it’s very cool that Dulwich is out there for python programmers who want to interact with git repos. Very cool to see!

Google Code Now Supports Git for Hosted Projects

Being a big fan of Git for version control, I was very pleased to see the announcement last week that projects hosted at Google Code can now use git in addition to subversion and mercurial (see also Google Code’s GitFAQ). I had looked at hosting projects on Google Code in the past, but chose not to specifically because git was not an option. While I personally am quite happy using Github for project hosting, it’s always good to see other services supporting git:

Googlecodeandgit

Way to go, Google Code!

Mac OS X Lion is now in the App Store – are you upgrading?

It’s here! Now available in the App Store…

Macosx lion

Are you upgrading today? I’m going to wait a bit on my corporate MacBook Pro to make sure all the apps we use are compatible with Lion… but I’m thinking my home iMac is definitely getting the treatment today… 🙂

How about you?

P.S. TheNextWeb folks came out with a nice summary of what’s new in Lion.

Code.DanYork.com Now Running WordPress 3.2.1

In addition to being where I write about programming and other developer topics, this site is also where I test out new WordPress releases before installing them on other sites like the Voxeo blog portal or the Voice of VOIPSA site.  This site runs on a WordPress Multi-Site installation, although there aren’t many sites here (another one is my new IPv6 book).

This past week I installed WordPress 3.2 (followed by the 3.2.1 bug fix) and I have to say I am quite impressed with the back-end changes described in the announcement.  Some of them are just minor little nuances… the changes in the typography, even…   it just feels snappier and faster.  If you run a blog on top of WordPress, I have to say that 3.2 is definitely worth a look… I’m loving it!

The FCC … on Github??? and releasing a WordPress plugin???

FCC logoI love being surprised… did you know that the Federal Communications Commission (FCC) is making code available as open source over on Github? And that FCC staffers have released a WordPress plugin?

I discovered this via a tweet from someone that brought me to the “Official FCC Blog” and the July 6th post, “Contributing Code Back: FCC.gov’s Open-Source Feedback Loop,” that outlines many of the contributions they have been making.

As a long-time open source advocate, I’m thrilled to see the FCC doing this. It’s great to see them on Github – and it’s great to see them giving back to the WordPress ecosystem.

And I love that they end the post asking readers to fork their code and contribute changes back!

Great to see – and kudos to the FCC “new media” team for getting involved in this way.

Calipso – A Content Management System (CMS) Written in Node.js

Calipsologo

As a writer of online content, I’m always looking at what is new in the world of content management systems (CMSs), and I was intrigued to see that there is a new CMS out based on Node.js called Calipso (and with the brilliantly simple url calip.so). Here’s the description:

Calipso is a content management system (CMS), based on the NodeJS server.

Due to the asynchronous nature of NodeJS, it seemed like a good idea to try to build a CMS made up of modules that could execute asynchronously in a non-blocking way.

This is the start of that journey, we are in the early days, so be patient, but feedback is always appreciated!

The site itself is of course built using Calipso and demonstrates some of the capabilities. Alex Young over at the DailyJS JavaScript blog also wrote a detailed code review of Calipso that gives a good sense of its capabilities. The code itself can naturally be found on Github for those wanting to dive into the source code itself.

While right now I will stick with WordPress as my CMS for this site (primarily because I barely have enough time to write, let alone work on the backend of the site), it’s good to see someone working on a Node.js-driven CMS and I’ll definitely keep watching its evolution. Cool to see!

Code.DanYork.com Now Available Over IPv6 as of World IPv6 Day

Ipv6day 1Just in time for World IPv6 Day, I’m pleased to note that Code.DanYork.com is now available over IPv6!

This site runs on WordPress and while WordPress itself works fine with IPv6, the trick was to find a web hosting provider that provided solid IPv6 connectivity.

After much investigation, I finally set up a basic web hosting account with Hurricane Electric. They’ve been in a leader in IPv6 deployment and have great interconnections to other IPv6 networks. They are also the folks behind Tunnelbroker.net, the free service I use to get IPv6 connectivity into my home office (using a setup for IPv6 with an Apple TimeCapsule that I described in another blog post).

I had this site hosted at another webhost, but through the sheer beauty of WordPress’s export and import features I was able to move the entire contents of the site over to Hurricane Electric without any problem.

For those curious, I’m running the site in WordPress’ Multisite mode as I’m planning to move more of my sites over to HE’s hosting. I’m using the Domain Mapping plugin to let me map different domains to different blogs. It’s all working wonderfully.

Now, unlike Google and Facebook, I’m not removing the IPv6 connectivity for this site after the 24 hours of World IPv6 Day are up. This site is live with IPv6 and will stay set up with IPv6 for the foreseeable future. (But having said that, I have nowhere even remotely near the visitors of the larger sites… and I have the luxury of not having to deal with large numbers of people who may have challenges connecting to my site.)

Welcome to the new IPv6 Internet!

P.S. If you want to learn more about IPv6, and in particular IPv6 and VoIP/SIP, you can visit the IPv6 Resource Page I put together over on Voxeo’s site. I’ve got some HOWTOs, tutorials, videos, links and more…


As an aside, over on the right navigation bar you’ll see a little “IPv6 detector” box that will show you either your IPv6 address or your IPv4 address (and yes, I blacked my actual address out in the screenshot because I’m just naturally paranoid):


Ipv6detector

I’m using the “IPv6 detector” plugin for WordPress by Andres Altamirano, although I did alter it a bit. I shortened the text that was printed for an IPv6 address so that it would fit in my theme’s sidebar. I also removed the URL link and removed the extra links about IPv4 exhaustion.

Installation was a snap, though… I just installed it into WordPress and then went to the Widgets area of my theme and dragged it into the location where I wanted it.

My Github repo of SMSified experiments

Smsified 1Earlier in the week I mentioned a quick python app I wrote to send SMS messages using SMSified. I’m storing that code and some other experiments up in a Github repo at:

https://github.com/danyork/smsified-experiments/

If you are a Github user and also interested in building SMS apps, please feel free to “watch” that repo and follow along with my own experiments. Code will probably be a mixture of python and Node.js, with occasional other languages thrown in.

Skulpt – a JavaScript-based way to run Python inside your web browser

SkulptIn the process of writing about the site that lets you run Linux in your web browser, I learned about Skulpt.org that is essentially the same idea only for a python command line.

The demo at www.skulpt.org is pretty cool… just modify the python code in the screen and press Ctrl+Enter to execute the code and have the output appear in the box below.

To play with it yourself, you can get the code at http://code.google.com/p/skulpt/ or as author Scott Graham shows on the Skulpt.org page you can just use mercurial to clone the repo.

I haven’t installed it myself… again, like the “Linux in your browser” experiment, I think this is very cool but I’m not entirely sure where I’d personally ever use. Still, I’m very glad people build projects like this – if for no other reason than showing that this could be done!

Cool stuff…

Greg Bayer: How to Move Files From One Git Repo To Another While Preserving History

By way of a Hacker News post, I learned of this great post by Greg Bayer:

Moving Files from one Git Repository to Another, Preserving History

I’ve actually had a couple of cases where I’ve wanted to move some files and keep the history. I couldn’t easily figure it out and opted to just copy the files into the new repo and lose the history. This looks like a workable solution instead. Thanks to Greg Bayer for writing it up.

P.S. a comment to the HN post also mentions this “git-subtree” tool, which does look interesting.