Dan’s View


My Reynholm Industries Card

Filed under: Geek — dan @ 12:43

My new ID card.


Helpful README?

Filed under: Geek,linux,work — dan @ 10:15

[root@ahost cvfs]# ls
bin config debug examples gdbinfo help install man ras
[root@ahost cvfs]# cd help
[root@ahost help]# cat README
This page intentionally blank.

I was kinda annoyed by that :)


Building an iPhone app using Flex SDK and PFI

Filed under: Geek,Programming — Tags: , , — dan @ 20:47

A simple intro into making an iPhone app using flex SDK and Packager for iPhone.

With my Air/Flex apps I generally start with the following folder structure:


And have a Makefile like so:

ASSETS=Default.png images/logo_128.png
FLEXARGS=-load-config ${FLEXCONFIG} -optimize -headless-server -incremental -source-path=$(INCDIR)
all: $(AIRSWF) $(AIRIPA)
run: $(AIRSWF)
	$(ADL) $(APPXML) ./
	$(AMXMLC) $(FLEXARGS) -output $(AIRSWF) $(MXML)
	$(ADT) -package -storetype pkcs12 -keystore $(KEYFILE) -storepass $(KEYPASS) $(AIRAPP) $(APPXML) $(AIRSWF) $(ASSETS)
	$(PFI) -package -target ipa-test -provisioning-profile $(PROFILE) -storetype pkcs12 -keystore $(KEYFILE) -storepass $(KEYPASS) $(AIRIPA) $(APPXML) $(AIRSWF) $(ASSETS)
	rm -rf bin/* dist/*

So update the Makefile above with your own KEYFILE and KEYPASS.

For you application descriptor XML set ./src/HelloWorld-app.xml to:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/2.0">
	<copyright>Daniel Bartlett [dan@f-box.org] 19 Sept 2010</copyright>

For our src/HelloWorld.mxml:

<?xml version="1.0" encoding="UTF-8"?>
	<mx:Script source="HelloWorld.as"></mx:Script>
	<s:Label text="Hello, world!"></s:Label>

And a very simple no-op src/HelloWorld.as:

public function init():void {
	var aString:String;

Now if all goes according to plan, you can run make from the directory and end up with a dist/HelloWorld.ipa install into iTunes and sync!

And you should end up with an app that looks something like this:


ShoutCast Stream Meta script

Filed under: Geek,Programming — Tags: , — dan @ 10:00

Using the following python script you can pull the meta info from a playing stream. The headers variable will contain the Radio Name and other things, and the meta’s returned will include the currently playing track.


Example output:
dan@x ~/ $ ./get_icy_name.py
{'headers': {'icy-genre': 'Techno Drum and Bass', 'icy-notice2': 'SHOUTcast Distributed Network Audio Server/Linux v1.9.93atdn
', 'icy-pub': '1', 'icy-br': '128', 'icy-name': 'Bassdrive - Worldwide Drum and Bass Radio', 'content-type': 'audio/mpeg', 'icy-metaint': '24576'}, 'metas': {'StreamTitle': 'G-Shock Radio Feb 25th 2010 - hosted by Kasio', 'StreamUrl': ''}}
dan@x ~/ $


Overground Re-route

Filed under: Travel,london — Tags: , , — dan @ 09:02

One thing I am glad of with London transport, especially around where I live is the ability to take a different route in the case of one’s primary route being screwed. As this morning, the Piccadilly Line has severe delays so I have re-routed onto the overground to Paddington. Even got a seat!


Tube Crush

Filed under: Travel,london — Tags: , , — dan @ 17:45

So here I am again on my journey home on the Piccadilly Line. I catch it from Piccadilly Circus so am used to the influx of tourists who don’t know fully what they are doing, I can handle that. What is more annoying is the stupid commuters who just don’t consider the people around them.
I tend to take my bag off my sholder, be aware about who is standing behind me and generally not to cramp them too much. Why the fuck cannot others manage this simple idea!
So what do you do in a situation where there is no room? Hold your ground. It would break tube etiquette to say anything. So we suffer in silence, well not quite; today I have a soundtrack of the recent Dom and Roland album, kinda Agro-DnB, if that’s an accepted genre..
So I can now breathe again since the stupid woman bringing a massive suitcase just got off at Barons Court, after bashing my ankles with it. Very glad I’m wearing my steelies today, they still might come in handy for the stupid guy who’s arm is nearly in my face because he has to hold onto the handrail far from him but close to me, dick.


$1bn aid for healthcare in the 72 poorest countries

Filed under: Political — Tags: , , — dan @ 11:51

If you feed money in to a developing countries health care system, what happens when you stop feeding money? This is in reference to the $1bn that the governments of the UK, Norway, Netherlands and Australia will be giving to the GAVI for the worlds 72 poorest nations.

Does the country have a high enough GDP to support the systems that have been introduced in the long term? I am guessing not, or else why did we need to feed the money in the first place. Therefore why waste the money, effort and time. I am all for helping a country develop, but it should be in a maintainable fashion, therefore helping to improve the countries economy and then it will be able to improve it’s own health care (along with everything else).


The issues with noisy systems

Filed under: work — Tags: , — dan @ 17:32

Today I felt like I completely failed at my job. I was ‘on shift’, therefore I was supposed to be keeping an eye on all of the systems at my work and their health. Yet I failed to notice an issue ‘that was glaring me in the face’ for over 3 hours, due to the ‘noise factor’.

At the beginning of my shift I noticed some parts of our monitoring had been semi-broken for a large part of the weekend. So I focused on getting that fixed. Once I had that fixed that my monitoring systems were showing about 2000 alarms, which is high. But due to the large chunk of the infrastructure that had gone un-monitored over the weekend I didn’t think much of it. Alongside this there was some database maintenance ongoing.

So how did the noise fail me, well the number of alarms for databases should have been glaringly obvious. But due to the monitoring and maintenance issues, I didn’t take heed. When you are used to having between 100-200 alarms, and you have a system reporting 2000; I find that it gets very difficult to get a handle on the real problems.

Overall I know I didn’t fail, but for the next few hours I am going to be beating myself up about it.


Wasted BogoMIPS

Filed under: Geek,linux,work — Tags: , , , — dan @ 14:15

So last week I screwed up in a royal fashion. I caused 1 core on 12,000 servers to be running at 100% with a zombie process. In conversation with a friend he asked “So how many BogoMIPS were you wasting?”, of course I had to find out.

So I grepped out the first core on each box’es BogoMIPS value and summed it up.

Per second: 61099300 BogoMIPS

If you take that figure and multiply it up for 12 hours.

Total: 2639489760000 Million Instructions

For more information on BogoMIPS please see this nice FAQ.



Filed under: Geek — Tags: , — dan @ 20:11

“If your ISP has registered with the appropriate databases, our servers are updated on a regular basis so you will have to wait until the next refresh to gain access.”

Would you interpret that to mean they are using whois lookups on IP addresses/blocks to check its location for limiting content to certain contries?

Older Posts »

Powered by WordPress