Tag Archives: tech

Valgrind II — helgrind

Last time we looked at valgrind’s memory leak detector, memcheck. This time we’ll be looking at an even more difficult to catch class of bug, thread race conditions. First let’s be clear what a thread race is: a race is when two threads run code that access the same piece of memory. The outcome is… Read More »

Valgrind I — memcheck

In this series I’m going to give you a quick tour of the valgrind tool suite. valgrind is useful for finding those hard-to-find, serious-repercussion bugs that can sneak into your code. Consider this C++ program: // C++ #include <iostream> // C #include <stdlib.h> // OS #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> using namespace… Read More »

Asterisk and Cisco 7940

There are a number of guides out on the Internet for getting Cisco phones working with Asterisk. I didn’t particularly find any of them 100% thorough. This then is my guide, documenting the moment I ordered the phone to the moment I made a call on it. I bought a Cisco 7940 phone from eBay.… Read More »

Software Defined Radio (RTLSDR) — Part I

A quick (simple) word first on how radio receivers work. A “message” is created at so-called “baseband”. You can think of it, if you like, as the signal that comes from the microphone in the radio studio. That message is used to modulate a carrier wave. A carrier wave is a pure sinusoid at a… Read More »

WordPress Fight

A quick note in case it helps someone else using WordPress. I had a bit of a fight trying to get WordPress to output the HTML that it was given for a post unaltered, this article records what I did. I write these articles in markdown syntax, then convert them to HTML using pandoc. One… Read More »

Asterisk For a Small Business (VII)

As we left things last time, we had a nicely organised dial plan that had the minimum of duplicated code, and was essentially a set of tables that mapped endpoints to extensions or queues. Let’s remind ourselves. [internal-extensions] ; Numeric aliases exten => 2100,1,Goto(andyp,1) exten => 2101,1,Goto(wife,1) exten => 2102,1,Goto(handytone1,1) exten => 2103,1,Goto(handytone2,1) exten =>… Read More »

Asterisk For a Small Business (VI)

Last time I showed you how to add voicemail facilities to your incoming lines. We concentrated on the local end, how a single access number could pickup voicemail from different mailboxes depending on the extension it was dialled from. I didn’t discuss the receiving side very much, and simply gave you this template: [external] exten… Read More »

Getting Started With Tor

I’ve heard lots about Tor, and thought it was about time I learned how to use it. I have no actual use for it; but in the same way I have no emails that are really private and yet still use OpenPGP, I like to know how to use the technology that keeps prying eyes… Read More »

Analogue versus Digital

On Radio 4’s PM some time ago, there was some guff talked about music quality. It’s standard guff talked by people who call themselves “audiophiles”, but in fact know absolutely nothing about electricity, signals, or in fact any mathematics whatsoever. They were very vague about it, but in essence the claim was that digital music… Read More »

Blowing a Fuse

I like to use avrdude for programming my AVR’s. It’s got support for pretty much every possible programming method supported by the AVR CPUs and has a good command line interface. A command line interface is very important when you use Makefiles to act as your IDE. Here, for example, is a little bit of… Read More »