You are here

Command Line Warriors

Command Line Warriors
Checked: 6 days 7 hours ago
Updated: 12 years 9 months ago
Update every: 1 week

commandline.org.uk posts feed.
Subscribe to Command Line Warriors

Five useful command one liners

Command Line Warriors - Wed, 24/12/2008 - 1:00pm

I had a browse through my shell history (history | less), and there are some interesting commands that I have used recently. The really experienced command line warriors among you will probably know them already, but it never hurts to have a reminder.

1. How to migrate a MySQL database

If you want to export data from an MySQL server on one server, and then import the data on a new server, this is pretty easy when you know how, just use the redirect symbols, greater than ('>') and less than ('<').

On the first server use the following command:

Introducing Soturi - yet another Django blog application

Command Line Warriors - Mon, 22/12/2008 - 8:40pm

In the last post I talked about how the server this site runs on was upgraded. This made me think about refactoring the Python code that this site runs on. This site has been running on this code base for a couple of years so I have built up a lot of cruft that could be simplified and improved.

I am still working on the code, so I have not ported this site to it yet as I might still make significant incompatible changes, or others may come up with cool ideas.

So far I have stripped the code to the very core, and added some (ugly) example templates.

How to replace a Macbook Pro key

Command Line Warriors - Fri, 24/10/2008 - 3:23am

My work provided machine is a Macbook Pro (which I use Ubuntu on). While cleaning the keys, before I noticed, I managed to push off a couple of keycaps and could not immediately get them back on properly.

The following image shows the three parts, you have a keycap and two hinges.

http://commandline.org.uk/images/posts/hardware/macbook-keys.png

Image Credit

After a little trial and error, I got the following method:

Extra Uncut RSS feed

Command Line Warriors - Thu, 16/10/2008 - 12:36am

If first rule of media is 'give the people what they want', then the second rule must be 'and nothing more'.

The tagline of this site is "Taking Control of your own technology", and as regular readers will know, I interpret that pretty widely, from free/open source software, freely shareable music, programming and so on.

However, I have also in the past had the occasional holiday photo, or some other off-topic post.

How to find the fashionable blogs quickly

Command Line Warriors - Wed, 15/10/2008 - 7:07pm

I used to read all the blogs about New Testament Studies and New Testament Textual Criticism. I made a little website to aggregate them together so I could read them online from wherever I was (I did not use a laptop at that point).

However, I did a part-masters in a different subject, worked in the real world and concentrated on improving my programming skills. So I forgot about my little aggregator, stopped reading it and then did not renew the account it was hosted at.

Building the TEI documentation

Command Line Warriors - Sun, 12/10/2008 - 12:09pm

When people want to make a digital representation of a hand-written manuscript or printed book, then they can make up their own format, however there is a standard for the representation of texts in digital form, it is called the Text Encoding Initiative Proposal 5, also known as TEI P5. There are previous versions of the TEI, but the current version, P5, is an XML-based format.

This Week - ISO fractures and are rich luddites just lazy?

Command Line Warriors - Sun, 12/10/2008 - 3:12am

Welcome to another installment in my series about what I have read on the web recently.

Daniel has been trying out ZFS on FreeBSD, cool stuff. For those not in the loop, ZFS is causing a big stir in the server world because it can span multiple volumes and allows huge filesystems. It is not available as a root file system in Linux, so I doubt it will be the last word in filesystems.

ReStructuredText tables and doctests

Command Line Warriors - Sun, 05/10/2008 - 9:44pm

As regular readers will know, I often share one file Python scripts here. Recently I wrote table.py, a simple module for creating reStructuredText tables in Python. It is available from my code section. Or you can go to the direct download. Save it as table.py somewhere you can find it!

As always, constructive comments, suggestions and improvements are very welcome.

Ohloh and the popularity of programming languages in free and open source software

Command Line Warriors - Mon, 22/09/2008 - 12:13am

I came across my name in a site called Ohloh. I remember it coming out a few years ago. Now it has had time to really get going, I thought it was about time that I review the site here.

Ohloh tracks the free/open source software it knows about, they only track code held in CVS, Subversion or Git (i.e. not in bazaar, which I tend to use, or mercurial), in repositories that they can easily find. Despite the limitations, this is a very large amount of code.

Django FreeComments cleanup script

Command Line Warriors - Sun, 21/09/2008 - 12:22pm

This site uses the comments module provided by the Django web framework, in particular, is uses the FreeComment model to allow you to leave comments. One field I had not used so far was the "approved" field, I had simply put all the comments up on the web straight away, and just deleted the occasional spam that managed to beat the system.

Now however, I have decided to use the approved field. I will still put comments up straight away, but now I will set ones I have read to approved. Allowing me to view new comments behind the scenes.

The history of XML

Command Line Warriors - Sat, 20/09/2008 - 10:53am

XML did not fall from heaven (or if you prefer, arise out of hell) fully completed. Instead there was a long process of standardisation.

In 1969, Bob Dylan started his comeback at the Isle of Wight festival, meanwhile, Elvis began his in Las Vegas, Elton John releases his first record and David Bowie's Space Oddity coincided with the Apollo 11 mission to the Moon.

The history of XML

Command Line Warriors - Sat, 20/09/2008 - 10:53am

XML did not fall from heaven (or if you prefer, arise out of hell) fully completed. Instead there was a long process of standardisation.

In 1969, Bob Dylan started his comeback at the Isle of Wight festival, meanwhile, Elvis began his in Las Vegas, Elton John releases his first record and David Bowie's Space Oddity coincided with the Apollo 11 mission to the Moon.

Sisu and typing unicode in GNOME

Command Line Warriors - Sun, 31/08/2008 - 11:48pm

I have decided to finally make a serious go at trying to learn the Finnish language properly. The eventual aim is to be able to read (sing?) the poem Kalevala in its original Finnish.

Finnish has three more letters than the English alphabet: ä and ö are used in Finnish words, while å is hardly ever used, i.e. in Swedish loan words or names, such the Åland island in the Finnish Archipelago Sea which is perhaps not the best example as it is called Ahvenanmaa by Finnish speakers.

PyCon UK Rambles and Statistics

Command Line Warriors - Sun, 31/08/2008 - 2:14pm

Python West Midlands

Yesterday was the Python West Midlands Technical Meeting. The night before I had arrived just arrived back in the UK, so I was a bit bleary eyed.

The group started about two years ago. After I learned Python I wanted to meet with other Python users in the area so we could share knowledge and have fun. So eventually I started a mailing list and website and put out a request to some local Linux group mailing lists for others to join me.

An Alternative Olympic Medal Table

Command Line Warriors - Wed, 27/08/2008 - 5:54am

So Great Britain did really well in the Olympics this year, coming forth in both total number of medals, and in the number of gold, silver and bronze.

Country Gold Silver Bronze Total Great Britain 19 13 15 47

So well done to all the Olympic Athletes for taking part, from whatever country.

Newspapers please link to your sources

Command Line Warriors - Wed, 20/08/2008 - 10:38am

The pop singer Lily Allen wrote a piece on her blog saying that she had finished her anticipated second album called Stuck On The Naughty Step but her record company had not yet released it, perhaps because the people supposed to be doing that had been laid off.

Native XML storage with Berkeley DB XML - part one

Command Line Warriors - Thu, 14/08/2008 - 5:12pm

XML databases have not really broken through yet in a big way, primarily because SQL has proved more resilient than expected in storing a wide range of data.

SQL has limits

For example, object-relational mappers such as SQLAlchemy, the one inside Django and ActiveRecord in Ruby, have become very popular recently, as they all you to serialise in-memory objects and store them in a database. Very little SQL experience is required and you can create very elaborate relational storage.

Native XML storage with Berkeley DB XML - part one

Command Line Warriors - Thu, 14/08/2008 - 5:12pm

XML databases have not really broken through yet in a big way, primarily because SQL has proved more resilient than expected in storing a wide range of data.

SQL has limits

For example, object-relational mappers such as SQLAlchemy, the one inside Django and ActiveRecord in Ruby, have become very popular recently, as they all you to serialise in-memory objects and store them in a database. Very little SQL experience is required and you can create very elaborate relational storage.

Recurring monthly events in Python

Command Line Warriors - Sat, 09/08/2008 - 11:13am

I was working on something in one of my little Django sites and wondered how you make a recurring monthly event in Python? What I mean by recurring event is "every fourth Saturday" or "every first and second Wednesday" and so on.

I did not want to make a dependency on some huge calender server module like Calcore or Twisted's caldav. All I wanted was a function that accepts "every fourth Saturday" and returns me an actual date that I can use for scheduling things.

Is GUADEC just GDEC?

Command Line Warriors - Thu, 07/08/2008 - 6:15pm

I am sitting now in the beautiful city of Tampere, the heart of the Finnish lake district. This city offered to host GUADEC but were refused, nuts, but if you read my recent post Exploring Technical Conference Demand and Supply, you will understand why.

PyCon UK 2008 this September

Command Line Warriors - Sun, 27/07/2008 - 3:57pm

Long time readers may remember that I am one of the organisers behind the conference of the United Kingdom Python community, PyCon UK, this year held over the weekend of September 12-14th. I am also giving a talk.

Threescore and five

Command Line Warriors - Sat, 26/07/2008 - 12:42am

65 is not normally considered a notable number, but we can celebrate it here in this post. At least here in Europe, 65 is the traditional age for retirement. Even more important is that 65 is the atomic number of terbium, a metal used in making solid-state Flash drives.

In 1965, the film Mary Poppins romped home at the Academy Awards winning five Oscars.

Top Ten mailing list posts in the history of free/open source software

Command Line Warriors - Fri, 25/07/2008 - 2:29pm

A few months ago, we looked at Linus Torvalds in his own words, which was surprisingly popular (for a filler ;). So following the same approach (i.e. too busy to write something original today ;), what are the top-ten best mailing list posts in the history of free/open source software?

This is pretty difficult to say of course, so here are ten coolest posts that spring to mind. If you can think of a better one, please do paste a link in the comments.

Pages

Subscribe to Command Line Warriors