Chord changes for “The World Is Saved”

2011-11-21

I noticed that there aren’t any good Google Search results for “The World Is Saved chords”, so I wrote them down.

The World Is Saved chord changes

The World Is Saved chord changes

All the chords are major; there isn’t a single minor chord in this song! The meter is 12/8 at about 76 bpm (beats per minute, one beat is three eights).

Zyxel P-660HW-T1 vs IPv6 tunnel vs SIP

2011-10-02

I’m a SIP/VoIP user.  It allows me to make international calls for the cost of a local connection.  I have set up a Linksys PAP2T gateway with a regular phone connected to it. Worked great for calling out.  Unfortunately, the SIP gateway kept on logging out of the SIP server.  It could last a day or an hour, but it would always eventually lose the logged-in state and never return to it without human intervention.  Resetting the gateway would not help, it was usually necessary to switch it off for 15 minutes or so.  A quicker method was to change the SIP port from 5060 to 5061 and back every time I needed to restore the service.  I tried fiddling with the PAP2T settings, but no setting changes seemed to alleviate the issue.

I’m also a an IPv6 user.  I’ve got an OpenWRT installation on WRT54GL, running aiccu and providing an IPv6 tunnel from SixXS.  The tunnel had a similar ailment: it would go down every couple hours to days.  The workaround was to restart aiccu.  I would restart it when I needed it.

At some point, I started neglecting the IPv6 tunnel.  I didn’t need to use it, and I just didn’t bother to restart it.  At the same time, I noticed that the SIP gateway would stay logged in without dropping out for much longer than usual.  This state remained for about two weeks, until I needed to reinstate the IPv6 tunnel.  Right after doing that, I walked over to the SIP gate and… noticed that it had dropped out.  Correlation does not imply causation, but you know… it raised my suspicion.  What is it that these two devices have in common?  The router!

A search on Google for “zyxel sixxs sip” revealed a forum post, in which someone described the same symptoms I had, with a bit of diagnostics.  Both the IPv6 tunnel and the SIP service are using UDP, which is harder to NAT than TCP.  The Zyxel router would repeatedly get confused and misinterpret the IPv6 related UDP packets as SIP packets and vice versa.

The solution was to take away the logic out of the Zyxel router and make it act as a DSL modem only. I’ve reconfigured it to the bridge / transparent mode, and moved the NAT logic to OpenWRT.  I initially wasn’t sure how the bridging mode works, but it turned out to be simple enough.  What’s nice about my particular setup is that I have a static IP address.  The setup uses a /30 network block, so it’s effectively using up 4 of the IPv4 address space.  It’s essentially a 2-bit netblock, so we can use 0, 1, 2, and 3 as the addresses.  In practice it can be something like 83.251.44.193, and any CIDR calculator will tell you, that if your netmask is /30 (or 255.255.255.252), then it’s a 4-address network starting at 83.251.44.192 and ending at 83.251.44.195. Let’s consider the NAT mode first.

  • 0: netblock address
  • 1: the router tells you it’s the the remote side (the gateway)
  • 2: the router’s public IP address
  • 3: the broadcast address
It might look like the 1 address is remote, at the ISP side.  But if you configure your router in a bridging mode, you have 2 devices, and they both have public IP addresses.  Let’s call them Zyxel (acting as a DSL modem) and OpenWRT (doing NAT).
  • 0: netblock address
  • 1: the Zyxel router’s address (gateway)
  • 2: the OpenWRT router’s address
  • 3: the broadcast address
So what you might have thought of as the remote IP address, is your local router’s address.  What was there left to do, was configuring NAT on OpenWRT.  Linux knows how to interpret incoming UDP packets, and both my SIP gate and IPv6 tunnel are working correctly now.  Plus, I have more control.

FLOSS Weekly 163: OpenCSW, addendum

2011-05-04

FLOSS Weekly, a podcast about Free-Libre and Open Source software, episode 163 featured OpenCSW, a project I actively participate in.

Since I was not on the podcast, I would like to use this opportunity to add to what has been said there.

Q: 05:30 What is OpenCSW and what does it contribute to the world?
A: …to add to what Phil said (we provide packages free as in free beer), there are two parts of what we provide: one part is binary packages, and the other part is the source code to build these packages.  It hasn’t been historically the culture at OpenCSW (or formerly, Blastwave) to release build recipes.  At OpenCSW, the policy for all new maintainers is to release source code of all packages they build.  However, there is still a number of old-timers, who build packages using own, unpublished scripts.  We are making efforts to have all build recipes published as open source, and while we’re still not there yet, it’s one of the most important points on our agenda.  In this sense, we do care about freedom and about being an open source project.

Q: 15:15 Do you think of OpenCSW as of a Solaris distribution?
A: Yes, as much as it is possible, while being based on commercial Solaris. The main difference between OpenCSW and Linux or BSD distributions is that OpenCSW does not provide the base OS, such as the kernel, libc or an installer.  From the perspective of a business which runs third party applications, it’s important that their OS is supported by the vendor.  Nexenta is a lovely Debian-based system with a Solaris kernel, but you can’t get support for an Oracle database on it.

Read the rest of this entry »

A git-svn workflow

2011-03-28

Git, the version control system, has a subversion integration feature.  In short, it allows you to use git to interact with a subversion repository: check out and commit code back to subversion.

It sounds like an excellent feature.  My first thought was that I’ll be able to make a subversion checkout on one host, and use git to propagate my changes throughout all other host I work on.  Finally, I thought I’d be able to merge changes back to where I did the subversion checkout, and commit my changes back to subversion.

However, there’s a problem with using multiple repositories, git merge and git svn. The most common way to move changes between git repositories is git push and git pull. In short, it does git fetch, and git merge (plus a bit of magic I’m not sure about).  If you use git pull/push and try to commit back to subversion, you will sooner or later fall into the trap that I fell into some time ago.  I’ve since worked out a relatively sane workflow which allows me to work with code on multiple hosts and send changes back to subversion with no horrible recurring code conflicts.

The executive summary is: Use “git fetch; git rebase origin/master” to propagate changes and format-patch + “git am” to propagate changes back to your root git repository (the one that was used to make the svn checkout).

host1> git svn clone http://example.com/foo foo
host2> git clone ssh://host:/home/joe/foo
host2> cd foo; edit files…
host2> git stage -p
host2> git commit
host2> git format-patch origin/master
host2> scp *.patch host1:
host1> cd foo
host1> git am ~/*.patch
host1> git svn dcommit
host1> some more work, commits, code incoming from subversion…
host1> git svn rebase
host2> cd foo
host2> git fetch
host2> git rebase origin/master

In this workflow, git pull and push are not used.

host1 → host2 [git rebase origin/master]
host2 → host1 [git format-patch; scp; git am]

You need to take care if you’re using things such as “git commit –amend” on host1 on commits that have been first made on another host (e.g. host2).  Otherwise, this workflow does not create any recurring conflicts.

A side note: it’s perfectly safe to branch and merge within one git repository.  The workflow described above deals with the problem of moving changes across multiple git repositories.

How do I install a Solaris package?

2011-03-17

Shortly after joining a new team at work, I learned that team supports quite a number of machines running Solaris. While talking to the team about how the maintenance is done, the following question came up:

“How do I install packages?”
“You go to the server that keeps packages, you use ssh to copy the package in the directory format to the target machine, then you log into the target machine, and you run pkgadd.”
“No no, that’s not what I was asking. If I need to install a package on our servers, what do I do?”
“You use ssh to copy the package in directory format…”
“No no, not just one package on one server, I meant installing many packages on many servers.”
“You take the directory format package…”

It looked like I had an idea for a project: create a workable package management solution.  I ended up completing that project, which resulted in me being involved in the OpenCSW community. The general idea was like this:

  • There’s an internal mirror of the OpenCSW package archive.
  • An internal staging is implemented: we don’t install directly from the mirrored directory. Instead, copies called ‘unstable’, ‘testing’ and ‘stable’, are made.  Servers pull packages from ‘stable’ by default.  A chosen subset pulls packages from ‘unstable’ and ‘testing’.
  • There is an internal package overlay, containing additional, in-house built packages.  A wrapper around bldcat is used to create this repository. The same staging approach is used.
  • puppet is used to deploy packages.  pkgutil provider is responsible for interacting with pkgutil, which in turn is responsible for interacting with the Solaris pkgadd utility.  pkgutil is able to download packages from multiple package repositories.

If you want to know more or talk to project members, visit #opencsw on Freenode.

Eternal code conflict in git-svn

2011-01-06

I’ve been recently working with git-svn and I came across a frustrating scenario in which I’m hit with the same code conflicts over and over again. The recipe is the following

  1. Do a git-svn clone of an svn repository.
  2. Make a git svn clone of it, let’s call it repo1 (it’s a git repository).
  3. Make a git clone of repo1, let’s call it repo2.
  4. Do a native svn checkout of the svn repository, make a change to a file and commit it.
  5. In repo2, make a conflicting change to the same file and commit it.
  6. Pull the change from repo2 to repo1.
  7. In repo1, do a git svn rebase.  It will fail with a code conflict.  Resolve the conflict and run git svn dcommit.
  8. Pull changes from repo1 to repo2.  It will fail with a code conflict.  Resolve the conflict.
  9. So far so good.  All conflicts are resolved.
  10. In repo2, make an unrelated change to the same file in which the conflict has previously occurred.
  11. Pull the change from repo2 to repo1.
  12. Do a git svn dcommit.

In my experience, the last git svn dcommit fails with a code conflict – the same that initially occurred.  Moreover, even if I resolve this conflict and dcommit my new change, any subsequent changes to that file will result in the same code conflicts cropping up again and again.

I’ve written a script which reproduces the issue for anyone who would like to examine it and/or propose a recovery procedure, a fix or a workaround.

Driver Theory Test under Linux

2011-01-05

Linux is not one of the platforms supported by the Irish Driver Theory Test software, but I decided to give it a go under Wine. It did not work, but not because of a problem in Wine (at least not directly), but because of some sort of a copy protection in DTT. For some reason the DTT software thinks that the CD is a virtual CD, even though it’s a physical disc inserted into the physical drive.

The dialog window says:

This CD is probably a “virtual CD” or a counterfeit copy (which may have been sold or given to you illegally). Pirated software damages the industry, may not contain the most recent questions and will be not supported by us. If you have inadvertently purchased a pirated copy then you should return it to the seller demanding a full refund. We would appreciate notification at: todtsu…@imagitech.co.uk.

Perhaps the book store sold me an illegal copy, but it looks genuine. I’m wondering why is DTT thinking that the CD is not a physical disk.

Correlating news

2010-11-06

Today’s hobby: correlate news.

News item 1: Polish Catholic church received from the state 33 million PLN (over €8 million) more than officially announced.

News item 2: A ginormous, 33-meter high statue of Jesus Christ which is in production, is almost ready.

Magnets – how do they work?

2010-11-05

During TAM London 2010, the infamous Insane Clown Posse Miracles video was given as an example of an anti science manifesto. The catchphrase about magnets became quite popular among the conference delegates, as an example of stupidity.  However, I didn’t think that the phrase, or rather, the question itself is stupid.  We know that magnets repel or attract each other by the means of “magnetic forces”, but the explanation usually stops at the magnetic field, which is explained as “magnetic field means that if certain objects are placed within the magnetic field, there’s a force exerted on them”.  To my liking, that’s hardly satisfying.

It turns out, that the topic of magnetic force and ways of explaining it has already been discussed by Richard Feynman in an interview.

Feynman asks the interviewer “What do you mean when you ask ‘why?’”, and proceeds talking about various kinds of explanation that can be given.  Explanations need to be given using terms that the audience either already understands, or accepts as a satisfying without actual understanding.  The framework which allows to answer the “How do magnets work?” question, is utterly unfamiliar to lay audience, and cannot be used.  Analogies could potentially help, but there’s a problem.  Concepts within that framework are so different from anything that the audience is familiar with, that invoking analogies will be more confusing and misleading than helpful.

The question about workings of magnets is not as easy to answer as it seems.

Thank you? Yes. No, that’s not…

2010-07-21

“What does `tak’ mean in Polish?  Was it something like… `thank you’?”
“`Yes’.”
“OK.”
“No, that’s not what I meant. It means `yes’ in Polish. It means `thank you’ in Danish.”


Follow

Get every new post delivered to your Inbox.