running mightytext with chromium and ubuntu

Earlier today i was trying to evaluate Mightytext an application that enables you to send and receive SMS and MMS from your browser using your android mobile phone. But it didn’t go to well i eneded up in an loop asking “The application MightyText is requesting permission to access your Google Account.” again and again when google asked if mightytext should be allowed to access my account.

The help offered by the authours here: did not help to much since copying the string “ AND AND” into the cookie and site data  exceptions gave me an exception looking like this: “”…

The is quite easy when you figure it out…

Setup 3 different exceptions!

So allow the following 3 exceptions to the cookie and site data  exceptions:


free swedish number portability look up service

When Sweden implemented number portability for mobiles (MNP – Mobile Number Portability) and fixed lines there where some people who stated that this information should be published in DNS or a DNS like system so it would be cheap and available for everyone to use. Naturally the telcos wanted to do it the way they always did things. With a centralized fat solution.

So Sweden ended up with a Oracle based central database (CRDB) solution system implemented by Cap Gemini and Oracle. This system is now run by SNPAC AB (Owned by Swedens large telcos) who charges approx. 19200 Euros to connect and 14400 Euros per year. Which really is out of the reach for small scale actors on the market or hobbyists running an Asterisk pbx that would like to do choose the cheapest route to place a call.

The other day the Swedish PTS (The Swedish Post and Telecom Agency) launched a web page where you could check which operator was terminating which number. So i decided to go ahead and implement a DNS based look up method.

First a little rant about their service. Well it is nice that they offer different interfaces, today they support SOAP 1.1, SOAP 1.2, HTTP GET and HTTP POST. But why should the end user have to care about dividing the into NDC and SN?  (NDC – National Destination Code and SN – Subscriber Number) after all the PTS is authorative of the NDC’s so why couldn’t they split the number for us? And why not a whole MSISDN (Mobile Subscriber Integrated Services Digital Network Number) or why not a whole E.164 number? Or what about actually implementing a ENUM (E.164 NUmber Mapping) look up?

Ok enough rant. I had a couple of hours over so i sat down with a FreeBSD box and pwerdns and started to code. So now i (and the rest of the world) can do the following lookups with their favorite DNS tool:

% dig TXT

% dig TXT

The result is a string containing the name of the operator handling the number. (I have included a full output below) Not the best reply to do automatic call routing but good enough as a proof of concept implementation of bridging DNS and MNP database. Right now i’m implementing a ENUM type so you could automatically integrate this into your Asterisk PBX and choose the best outgoing line for your calls. Since operators often have “Call free within our network” deals this would be a great tool for low cost routing of your phone calls.

But before starting to implementing stuff using this a couple of notes:

  • This is an experiment.
  • I have not fully tuned caching and performance yet.
  • I currently only support the follwing NDC’s: 8, 31, 40, 70, 72, 73, 76 (Swedens 3 biggest cities and the GSM and 3G networks) More NDC’s will follow when i have found a machine readable list so i don’t have to type them all in…

So a couple questions to you reading this:

  • Would you like this as a permanent service?
  • Any other useful stuff you want to look up over DNS?
  • Which information would you like returned in the  ENUM? (I’m especially interested in the needs of non Asterisk users.)

Please give me some feedback below and i will try to take your ideas into consideration.

A full example of a search using dig:

% dig txt
; <<>> DiG 9.6.1-P2 <<>> txt

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57824

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0


;; ANSWER SECTION: 3600 IN TXT “Telenor Sverige AB”

;; Query time: 39 msec


;; WHEN: Sat Aug 20 13:44:06 2011

;; MSG SIZE  rcvd: 72


How to run a bitcoin generator on FreeBSD


After all this bitcoin hype lately and the fact that most clients are made for Linux, no wonder that i have seen several requests on how to run a bitcoin generator under FreeBSD. I’m still not convinced that bitcoins are more than a pyramid scheme, but i decided to check things out and it actually nowdays is quite easy to get a miner running on FreeBSD.

Well get a basic bitcoin generator and wallet running is quite easy:

First upgrade ports (The bitcoind port was recently updated), and then install bitcoind.

# portsnap fetch update

# cd /usr/port/net-p2p/bitcoind

# make install

When the config screen you have a option to enable the GUI or not. Since the port only installs bitcion (The command with GUI) or bitcoind (The command without GUI) you will have to decide which is best for you. I clearly prefer the version without GUI so it can be started in /etc/rc.local and run in the background.

When the install is done you have a bitcoin miner and wallet to run. Play a bit with it, but don’t use it!

Why? Well CPU mining is so slow that it will take for ages to get a bitcoin payout. I’m talking about years!

So instead join a mining pool. A mining pool is a service where serveral miners join forces and split the rewards when they mine a block of coins. In this way you will receive a small portion of the payout in proportion to how much you have contributed towards the block. The downside is that bitcon or bitcoind does not support joining bitcoin pools. So lets install another (Actually more efficient) miner. The one i have experimented with is called minerd and unfortunatly there is no port for it.

So this is what you need to do to get it up and running:

Upgrade ports:

# portsnap fetch update

Install jwasm:

# cd /usr/ports/devel/jwasm

# make install

And curl:

# cd /usr/ports/ftp/curl

# make install

Now it is time to download, patch and install minerd:

% wget

% tar xvf cpuminer-1.0.tar.gz

% cd cpuminer-1.0

Now some magic to get it running.:

Edit and find the follwing row:

DEFAULT_INCLUDES = -I.@am__isrc@

And change it to:

DEFAULT_INCLUDES = -I.@am__isrc@ -I/usr/local/include

A file missing on FreeBSD is byteswap.h, but since it is just some small static inline functions jsut download it into the current directory:

# wget

Now we are ready to run configure and compiling the source:

# setennv CFLAGS “-O3 -Wall -msse2”

# ./configure

# make



This should have gone ok with a couple of warnings. Now we can run the miner with the following command:

% ./minerd –algo 4way –threads 2 –url –userpass USER.XXX:PASS

(This example is for running against the server at and you will need to register before your work will count towards generating bitcoins.)

And please note the –algo switch, there is several sha256 implementations to choose inbetwen. Do a couple of runs and check wich one is fastest on your machine. Now give it some time and you can start seeing the bit-cents rolling on your mining pools statistics page.

Anything strange? Or any questions or feedback? Please drop a comment here and i’ll try to help you out.


eldorado found or swedish newspapers dont check their stories

The story that eldorado might have been found is so flawed…

It’s the Swedish newspaper Aftonbladet that picked up a story that someone might have found El dorado an hidden paradise. They also claim that it is an ancient city that was discovered on google maps. But if they would have read the original article in The Online times they would have found the following quote:

Hemming says that while the paper in Antiquity is “significant work by serious people … none of this has anything remotely to do with El Dorado or that racist, incompetent nutter Percy Fawcett. It’s as though someone tried to link a discovery at Stonehenge with, say, Edward Lear’s travels in the Balkans”.

They would also have found that the original paper was published in 2003 by Martti Parssinen and Alceu Ranzi. If they would have tried a little bit they would have found their report in Antiquity. There you can see that they totally missed the whole thing. The sites was discovered by airplane. The news in the report is that they discovered some earthworks (Ditches and soil hedges!) in an area they did not expect to find them. And it is not a city, it is earthworks. The authors speculate that the earthworks might have been for defense, ceremonies or for storing live aquatic food. Far from a city…

So why did this pop up now? Could it be due to David Grann mentioned in the article? Well at first it seems like that. He has written a book called “Lost city of Z” that was published in 2009 and is now being prepared for a movie. But i found a more plausible reason on amazon, the store not the rainforest… His book is being released as a pocket on January the 25th..

Good work David Grann, you got yourself some nice pr for the release of your book.

Naturally  Swedish blogggers swallowed the bait, but some had operating bullshit detectors.

aliens behind the placement of woolworths stores

One of the funnier things i read todays is that the placement ow Woolworths stores might be planned by the same aliens that planned the location of Stonehenge and a lot of other ancient British monuments…

It’s the mathematican Matt Parker that have found that the Wollworths store are placed to form exact equilateral triangles much in the same way as Stonehenge and other monuments are arranged. Naturally he is just illustrating how stupid the whole argument of alien assisted construction of ancient monuments is. The later according to an article in the Daily Mail a couple of days ago.

Personally i am convinced that if you draw lines in beetwen selected pubs here in Prague you will see a picture of Vaclav Klaus drinking a pint of Staropramen…

swedens energy crisis

Today it’s an extremely cold day in Sweden. Down to about -40 in some areas and in Stockholm it has been -20. This has put a big strain on Swedens electrical grid. Also a couple of nuclear power plant’s is down for maintenance. And even thou today approx. 7-8% of Swedens electricity is imported from neighboring countries supply still have a hard time meeting the demand. So Swedish newspapers have been warning about the issue and are recomending people to conserve energy. Also a couple of emergency power plants have been ordered to power up to try to meet the demand of electricity. This means starting to burn oil to produce electricity.

The solution is quite easy. And even reduces emission of greenhouse gases. Build some more more nuclear power plants and at the time increase transmission capacity to our neighbors. This way we have some headroom for cold days. If that’s not enough we could import more electricity when needed. But it works both ways, when not using the extra capacity we could export cheap and clean nuclear power to Germany and other countries that use a lot of power plants using coal as a source. And if we use the thorium reactors i mentioned  the other day we could actually get rid of our nuclear waste at the same time.

Unfortunately it takes so long time to build new power plants that Sweden would face this issue many times before they are operational.

green nuclear power plants

I consider nuclear power a relatively green and safe power source. This due to the fact that power plants running on coal spew out enormous amounts of carbon dioxide during normal production, but nuclear plants only pollutes during an catastrophic event due to malfunction. Added to this is that globally 10.000 people die yearly in coal mines and there is an estimate that only in the united states some 23.000 people per year die due to air pollution from coal-fired power plants.

But reading an article in Wired the other day, really made my head spin. They painted up an picture that made a “new” (It’s not really new, first experiments was made in the 50’s. Experimental reactors where running in the 60’s!) reactor look like the holy grail in solving our energy needs.

It’s a nuclear reactor burning thorium instead of uranium or plutonium. Thorium is much more abundant than uranium and it does not need expensive enrichment. That means you can use all the thorium you mine. When using uranium in a nuclear power plant you only use one specific isotope and this is normally 3-5 % of the ore. So most of the uranium mined is useless for generating power.

You might say what about the storage of the waste from the reactor? The radioactive waste from a conventional reactor needs to be stored for 10.000+ years. And that is quite a challenge…

The neat thing is that since thorium is a lighter than uranium the waste is of a completely different nature. It “only” has to be stored for a couple of 100 years. And if that is not good enough, if we mix the waste from our current reactors in the fuel it burns up generating energy and transmutes into short lived isotopes!

Too good to bee true? Whats the catch?

First of all it is a more complicated process, the fuel get’s polluted and looses efficiency over time, so there need to be a process to remove these pollutants. But the rest of the “catches” are what normal people would call features. The fuel is harder to ignite which means it is safer, much less risk of a reactor meltdown. The waste is polluted with a uranium isotope that makes it unsuitable for nuclear weapons. And one of the biggest problems is that the nuclear industry is not interested. Why not? Well their business model is largely built on enriching uranium and selling fuel to the reactors. And thorium based reactors does not need any enriched fuel, just dig it up out of the ground, clean it and start running your reactor. Yes quite simplified, but truth is that the producers of nuclear fuel will have to find other ways of earning money.

So if these reactors was running in the 60’s how come we don’t run them today? Some cynics say it’s due to the fact that they do not produce plutonium that could be used in nuclear weapons. But this is not really true, since most commercial reactors produce an isotope of plutonium not really suitable for weapons. The real issue was time to market. In 1973 the Arab states cut off oil supply to the west. So the US decided to lower their dependency on oil, and that quick. That year, the US nuclear industry signed contracts to build a record 41 uranium based nuclear power plants. So all the money and research went into uranium based fission.

But India wen’t in another direction. Since they where developing a nuclear weapons arsenal they where outside the non-proliferation treaty and where largely excluded from trade in nuclear plant equipment and fuel. Also they lacked indigenous uranium, but have 12% of known thorium deposits in the world. So they started developing a nuclear fuel cycle using thorium. And are today running a hybrid using conventional reactors to ignite the thorium.

But these reactors still generate a large amount of regular long lived nuclear waste. The really cool reactors is called molten salt reactors (MSR). These work by pumping a molten flouride salt containing thorium and some uranium (or waste from regular reactors) through the reactor. This liquid is then continuously cleaned from radioactive pollutants. The pollutants have the nice property that when you store them for about 10 months they turn into fuel that is feed back into the reactor.

So while some people argue about the IPCC and who is right or wrong in climate gate (Sorry in Swedish) and others are discussing how to get the world united on carbon dioxide emissions (Also in Swedish), why don’t we start by solving the engineering issues with the thorium fuel  cycle and start replacing coal based electricity with green energy from thorium.

An extensive article about thorium reactors can be found in an 2006 issue of cosmos. More in depth information about thorium and thorium reactors can be found at the world nuclear association.

why forbidding thoughts is a bad idea

Being a liberal i have always had problems with forbidding thoughts.  And now when doing some research into “climate gate”  i stumbled upon a blatant example.

During 22 years from 1984 to 2006 Sweden had a “thought ban” on nuclear reactors.  It was forbidden to design nuclear power plants or calculate costs for running these plants. This was one of the consequences of a referendum in 1980 about the future of nuclear power in Sweden. (One could note that this was a strange referendum, 3 options existed but none of them was an yes. They where all about stopping nuclear power in Sweden.)

So where are we now 30 years after this referendum? Well we are trying to stop emission of greenhouse gases, mostly focused on reducing carbon dioxid. One of the easiest and quickest ways to do this is to build more nuclear power plants and phase out the ones fueled by coal.

Sure and what about all the nuclear waste we have to keep secure for 10.000 years? Thats a relevant question and leads me to why i wrote this article.

There are “new” (They where first described in the 50’s and some where running in the 60’s!)  types of reactors that instead of using uranium as a fuel uses thorium. In the process they can transmute our old reactor waste. That is they reduce the waste we already have produced! The result is nuclear waste with a half-life time of less than 100 years. So the waste only needs to be stored for 100’s of years instead of 10.000+ years for conventional nuclear waste.

The Chinese and the Indians are already doing serious research into thorium based reactors and an US-Russian consortium is adapting thorium based fuel so it can be used in the reactors we already have built. A lot of this research have been done in the 30 years Sweden in principle banned nuclear research. Yes 30 years. It was first in 2009 that the Swedish government again started to give grants to nuclear power research.

This thought is not new, already in 2004 the Swedish newspaper DN published a debate article (Sorry it’s in Swedish) written by Niklas Ekdal covering this subject.
One could just wonder where Sweden would have been today if they used at least some of the approximate 20 billion SEK  that went into designing a long term solution to the waste problem into nuclear power research instead of forbidding all thoughts about constructing new reactors…

And bye the way, thanks for the comments on the Swedish blog “Klimatbluffen” that gave me the idea to write something about the Swedish “thought ban” before finishing my article about green nuclear power plants.

Baffling Medical Conditions

Some diseases are really strange. And a lot of them unexplained.

What about these for an example:

  • A woman who suddenly can’t open her eyes. It usually keep on for three days, then she is normal again for a couple of months.
  • A man who can’t freeze. Or rather his body copes so good with cold that he has swum under the north pole and climbed mount everest in shorts!
  • Allergic against cold! A ice cube on the skin will give a huge blister, even snowflakes in the face will give responses. And yes antihistamines help…
  • A boy who almost never sleep. (Poor parents, young children’s sleep patterns are stressful enough…)
  • People who can’t remember and others who can’t forget!
  • A girl who can not feel pain.

And there is alot more details about theese and other strange deseases over here. Check them out!

There is also a story of a girl who doesn’t get older. She is 16 now and still look like a 6 month old baby….

the future for saab

Some rumors today is that Koeningsegg (You know that fancy top of the line Swedish car maker) will buy SAAB. And yet some other say that the formal descision and announcement will be made in just a couple of days.

This sounds like a great solution, beefing up SAAB and at the same time giving Koeningsegg a lot of production capacity. Also it’s a way for the Swedes to bring back SAAB to Swedish ownership again. But then it’s a strange deal. A small company with 50 employees that builds a handful of cars each year, buys a company with thousands of employees building approx. 100000 cars a year!

But then some people think it’s a joke...