Openssl Hint for today

You find yourself trying to look at a certificate with Openssl (I’m using the cygwin version of openssl on windows 7):

$ openssl.exe x509 -in certificate.crt -text
unable to load certificate
2675716:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: TRUSTED CERTIFICATE

Openssl error messages are so cryptic, I tried looking at the code to deduce what it meant, and even that didn’t go so well.

The error message shown above doesn’t really have much to do with “trust”. It most likely means that your certificate is not in PEM format. The most common other format that certificates can be in is DER. If you wanted to view the certificate in DER format anyway, you would do this:

$ openssl.exe x509 -inform DER -in certificate.crt -text

the -inform argument allows you to specify what format the certificate you are trying to examine is in. The -text argument says “display it on screen”, and the -in argument specifies the certificate file name.

If you wanted to convert that certificate from DER to PEM, you would say:

$ openssl.exe x509 -inform DER -outform PEM -out ./PEMcert.crt -in DERcert.crt

-outform PEM says the output format should be PEM, and the -out argument specifies the filename to give the converted certificate.

 

 

Read More

Jquery .load() makes the target blank

If you run into the problem where calling .load(url) on an element makes it turn blank, you very likely have an unexpected space (” “) in your url.

You should re-examine it, it may be a trailing or leading space, which will make it difficult to see with the naked eye. Try calling the javscript .trim() on the url string.

At the time of this writing, I was using version 1.10.2.

Read More

HTTPD Alarm Clock

When your apache web server dies when starting with a message that goes something like “alarm clock” or SIGALARM, your solution is to get rid of the file:

/var/run/httpd.pipe

Strace helped to track this one down:

[admin@theSuperStar] httpd # strace /usr/sbin/httpd
open("/var/run/httpd.pipe", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, 0666) = ? ERESTARTSYS (To be restarted)
--- SIGALRM (Alarm clock) @ 0 (0) ---
+++ killed by SIGALRM +++

[admin@theSuperStar] httpd # mv /var/run/httpd.pipe /var/run/httpd.pipe.off
[admin@theSuperStar] httpd #/etc/init.d/httpd start 
Starting httpd: [  OK  ]

Read More

Serviio and high quality LPCM audio output

So a quick post here. If you want your Serviio instance to push 16-bit, 2 channel LPCM audio to your DLNA client or renderer, you need to configure your audio profile like this:

<Audio targetContainer="lpcm" aSamplerate="48000" aBitrate="1620">

Basically, aBitrate=”1620″ for LPCM means 16 bit 2 channel. The default (as of this writing) appears to be 192, which makes no sense, and gives you horrible 1-bit 2 channel LPCM.

If you need help with editing the audio profile, read this slightly technical article: http://www.serviio.org/index.php?option=com_content&view=article&id=16 

Now go have fun 🙂

Read More

I Can Rule!

This irule should allow you to redirect from http to https, as well as append a www. to the hostname if this is not already there….

If you know what an irule is, and you found this page, chances are good that this is what you’re looking for. Have fun, and pay it forward.

Remember, this is the personal blog of some dude on the internet. Use your common sense.

when HTTP_REQUEST {
set hname [substr [HTTP::host] 0 4]
#log local0. $hname
if { [string tolower $hname] equals “www.”} {
HTTP::respond 301 Location “https://[getfield [HTTP::host] “:” 1][HTTP::uri]”
} else {
HTTP::respond 301 Location “https://www.[getfield [HTTP::host] “:” 1][HTTP::uri]”
}
}

Read More

Some Facts about the Kobo Vox e-reader/Android Tablet [Updated]

There are a few things you should know before you buy this device.

  1. It does not support the Google Android Market place. The marketing materials are deceptive in this regard, as I bought this device under the impression that I would have access to the Android Marketplace. It ships with a bookmark to http://kobo.getjar.com, which is, to put it mildly, a little bit less than helpful. A consequence of this fact is that you cannot easily install your favourite apps..
  2. You don’t even get the official Gmail app, and you cannot add your Google Account to the device for syncing. You again get a silly bookmark to the mobile web version of Gmail. The device does ship with an Email application, which seems to be the stock generic email app for android, and that should theoretically support Gmail, but I have not tested it.
  3. The device is chargeable via Micro-USB, but it refuses to work with the USB charger for my Samsung Galaxy S. Forcing me to keep two USB chargers on my desk. I don’t know who is violating the USB Standard here, Samsung or Kobo.
  4. The device is slightly heavier than one would expect in the hand.
  5. The loudspeaker is not nearly competitive with a decent smartphone. Get yourself a pair of headphones if you plan on using it for multimedia. A small amplifier may even be necessary, as the loudness leaves a lot to be desired, especially if you have to use it while commuting.
  6. Coming from a nice smartphone, the screen of the Kobo Vox is noticeably less crisp, but does not really constitute an inconvenience.
  7. Yes, you can play Angry Birds (it is available from the Getjar Store).
  8. The web browsing experience is considerably improved after you install the Dolphin web browser and make it the default.
  9. I like the rewards scheme, where you get “virtual” rewards for achievements and other reading related activities.
  10. Reading PDFs with the psychologically addictive (due to the rewards scheme, and the ease with which you can intimidate your friends on facebook) Kobo reader app is rather hit and miss. I side-loaded (grabbed off the Web) Aldiko, which handles PDFs just fine, and is even capable of downloading from Oreilly and other DRM-free ebook stores directly.
  11. You can play videos, but you will get a better experience if you install a file manager and browse your videos using it, rather than the default Gallery app. You can get a file manager from the GetJar Store.

You can find more information about the Kobo Vox here: http://www.kobobooks.com/kobovox .

Read More

The Rift Between Airtel Nigeria and Its Call Center Agents

The Sound of Abuja

Airtel is the current name of the estranged Second Mobile operator to launch its Network in Nigeria back in 2002. The Company started out as Econet, became Vee Networks, and then switched to V-Mobile before people could get accustomed to the new name and then settled on being owned and operated by Celtel for a few years. It spent another few years going by the moniker “Zain” and in 2010, morphed into Airtel.

Upon acquiring the totem, Airtel greeted Nigeria with a glowing marquee of price cuts, an event which attracted significant media coverage and was well liked by the people. Behind the scenes however, more straight-faced business measures were being adopted. For one, the Call Centre operations which had previously been handled by 3 mostly local firms: Bezelyn, CCSNL and HR Indexx were slated for outsourcing to two large firms with Indian roots: Spanco and Tech Mahindra. This move was expected by the affected call centre agents to imply the transference of their employment to the new firms–basically a managerial concern. The average work routine wasn’t expected to change much, the agents were assured.

Some ancillary concerns of the call centre agents that had been addressed to varying extents, and which had been languishing in recent times were brought to the fore again. For instance, the call centre agents had always expressed a desire to have “official” phone lines, at least to ease communication with their colleagues. They considered it to be a reasonable perk, considering that they worked for a telecommunications company. Most of the agents also did not have identity cards, and those who did still held cards from when the company was owned by Zain.

Towards the end of the first half of this year, curious events began to unfold. A good number of pregnant women got fired under mysterious circumstances, and practically all call centre agents who had gone on leave did not receive their full allowances and entitlements on pay day. Other agents had their pay delayed and no explanations were forthcoming. With no pay, and no explanations, and a few absent colleagues, the agents responded by “downtooling”. An action described as being present at work, but not being very efficient. This happened on the 9th of Jun 2011, and it attracted some attention because the people who were fired were re-instated, and the Airtel management promised to pay back salaries in full and work towards providing phone lines for the agents and producing identity cards for them.

Calm ensued but was short-lived because a fresh controversy arose concerning the payment of bonuses following a profitable fiscal year for the company. The call centres are organised with the lowest rung being the “agent”, directly behind the “Team Lead”, before the “Assistant Manager”, and all headed by the “Manager”. End of year bonuses were received by everyone except the agents, and feeling short-changed they embarked upon a Strike action on the 18th of July 2011. Call centres were closed as part of the action, and again the Management resumed negotiations, promising to pay ₦21,000 (twenty one thousand Naira) as bonuses to the call centre agents.

Spanco and Tech Mahindra (it is a bit confusing who exactly is in charge) informed the agents that the current salary structure could not be sustained, and the agents would have to accept a 60% pay cut, or a 50% reduction in workforce, as well as changes to their working schedules, raising the working hours to 8 hours a day, 6 days a week, no breaks, 6 days of annual leave and a maximum of 12 days of sick leave per annum. This deal was presented to the agents early September and it appears that no official notice was served, which culminated in 3000 people showing up at work on Friday the 30th of September 2011, surprised to receive notice of termination of their appointment, and receiving 1 part of a multi-part text message informing them that the call centre will be closed at midnight because an agreement could not be reached between the management of Airtel and the call centre outsourcing partners (Bezelyn, CCSNL and HR Indexx). One of such texts read as:

Dear Call Centre Agent, the Management of CCSNL would like to inform you that our contract with Airtel expires today and therefore we would like to inform you t

It is a multi-part text message which was not completely delivered.

Currently, customer care calls emanating from Nigeria are being routed to Ghana following the closure of the two call centres in Lagos and Abuja.

Airtel’s most official sounding response to the entire storm is as follows:

Artel Call Centre Shutdown: The True Position

Contrary to the rumours and outright falsehood being peddled across certain social media platforms, Airtel Nigeria has not sacked any of its employees and does not have any intention to cut staff salaries. Airtel employees remain committed.

Regarding the recent call centre shutdown, the contract of an agency to one of our partners expired yesterday, September 30th. About 40 percent of call centre workers are employees of this agency. Despite the contract expiration, several employees of this agency will be re-absorbed into the system. So, the issue of mass sack, salary cut and poor benefits are outright falsehood.

Airtel is committed to realizing its vision of being the most loved brand in Nigeria and will continue to ensure that the dialogue between its call centre partners and their employees is fruitful and productive.

We also remain passionate in our quest to continue to provide our customers with the best service experience.

This statement is however at odds with the facts as at Midnight of 30 September 2011:

  • The privileged agents who have official lines were removed from the Airtel Staff Closed User Group which allowed colleagues to communicate with each other free of charge.
  • The official lines were stripped of all benefits, and functioned like regular phone lines.
  • Affected staff email accounts were deactivated.

 

Read More

The Hidden Persuader

Ever so often, In consuming technical literature, I find myself derailed by the vast hole in my familiarity with much of the jargon of Computer Science.

In my head, I am familiar with a decent amount of theoretical computer science. Programming paradigms are not strange to me. Design patterns, while not exactly the palm of my hand are near enough to only require added concentration to get me where the author of some literature I am reading wants me.

This morning, however, while looking for a less gruelling way to manage a variable list of objects that would eventually be used as a representation for a histogram in memory, I come across a bunch of terms that I can’t make up my mind If I understand in sufficient depth or not.

One of them is “Closure” (in a literature about programming languages). The only recollection of closure I have is that of a Professor on the fringe of lunacy, back when I was an undergraduate taking Abstract Algebra lectures in a class of 150 people crammed into a lecture room designed for 50 people, whilst the ambient temperature was a bustling 32 degrees Celsius.

Something tells me the two are related, but my ability to visualize the abstract algebraic notion is limited by the aforementioned learning conditions. I could quote the notion to you, but I have never thought about it in a context other than algebra, and even then, it seems to be invisible to me most of the time, that is, I get along just fine without remembering it, which is to say my life doesn’t seem to be influenced much by abstract algebra.

I find it much easier to understand concepts framed in a computational context, so this may yet be my opportunity to better understand closure.

Then there is “Generics”. This conjures images of generic pharmaceutical drugs, the kind we are used to in Nigeria, and weirdly, it also brings up images from the movie starring Will Smith: I, Robot– The scene in the robot factory where Will Smith is looking for the errant robot suspected of committing murder among rows and rows of practically identical robots in formation awaiting further processing in an assembly line. Generic — representative of a class of objects. Here we go.

Did I mention lambda calculus? Greek symbol, and a cornerstone of modern mathematics all rolled into one. It drops the temperature of my spinal chord by the right number of degrees and cycles it back up and then down at the appropriate number of hertz too.

A decent amount of tangential reading will probably ensue, and I need to justify why I need to sacrifice the practical aspect of just getting the darned code segment working, which is definitely possible despite these weaknesses in my grasp of the theory behind it all. I can only hope it is a wise idea to understand what is happening at a deeper level of detail, because it affords you more room for creativity when you encounter stranger difficulties in another situation.

If the mere ability to follow and understand contemporary literature is not sufficient in itself, then the face-saving advantage of not looking like a twit among experts should surely do the trick?

Ah, vanity. Always the hidden persuader.

 

Read More