Planet Open Ghana

June 20, 2014

Henry Addo

SMSSync V2.6 beta Released

We are pleased to announce the release of SMSSync v2.6 beta This release includes several fixes to issues with previous versions and minor features . Here’s a breakdown of what has been improved and fixed:

Features:

  • Replaced Action Bar Sherlock library with ActionBarCompat support library.
  • Upgraded Google Analytics library to V3.
  • Replaced the dropdown widget which is used for setting the frequencies for the schedulers with a time picker widget. Now you can set any time for the schedulers and not restricted to the predefined ones.
  • Now Task messages appear in the pending tray before they are attempted to be sent as SMS. This makes it possible to automatically or manually processed them when they fail to be sent as SMS.
  • Now sent and delivered SMS status codes are processed. You will know why a message failed to be sent, when a message is successfully sent and when possible, if a messages was delivered.
  • Action Bar Contextual Menu now has ‘selected’ appended to the selection count label. Makes reading the count more meaningful.
  • Added KitKat, Android 4.4.x support. Now you can set SMSSync as your default messaging app.

Bug fixes:

  • Fixed duplicate call to ‘readLogs @Produce’ function which causes the application to crash unexpectedly.
  • Fixed issues with configured secret key not able to match with the one set on the server when it has spaces.
  • Fixed issue with app crashing on some devices when checking for a connection before attempting a sync process after the device has finished booting.

Appreciation:
This release wouldn’t have come sooner if it hadn’t be the huge efforts of our community. Special thanks goes out to SolDevelo team for working on  the features and bug fixes for this release and also to the MedicMobile team for putting us in touch with them.

As always, thank you the community for your continued contributions through bug reports, feature request and code contributions

Download:
If you’re on earlier version of SMSSync, head on over to the Google play store and get updated to this latest version. You can also scan the QR code below to install it on your Android device.

Feedback:
We welcome feedback, questions, bug reports to this release and suggestions for enhancement to future releases. You can always reach out to us via our github issues page, Forums, dev mailing list or IRC, freenode.net #ushahidi or our Google+ page

The post SMSSync V2.6 beta Released appeared first on InfoZone.

by Henry Addo at June 20, 2014 06:48 AM

June 19, 2014

Joachim Breitner

Another instance of Haskell Bytes

When I gave my “Haskell Bytes” talk on the runtime representation of Haskell values the first time, I wrote here “It is in German, so [..] if you want me to translate it, then (convince your professor or employer to) invite me to hold the talk again“. This has just happened: I got to hold the talk as a Tech Talk at Galois in Portland, so now you can fetch the text also in English. Thanks to Jason for inviting me!

This was on my way to the Oregon Summer School on Programming Languages in Eugene, where I’m right now enjoying the shade of a tree next to the campus. We’ve got a relatively packed program with lectures on dependent types, categorical logic and other stuff, and more student talks in the evening (which unfortunately always collide with the open board game evenings at the local board game store). So at least we started to have a round of diplomacy, where I am about to be crushed from four sides at once. (And no, I don’t think that this has triggered the “illegal download warning” that the University of Oregon received about our internet use and threatens our internet connectivity.)

by nomeata (mail@joachim-breitner.de) at June 19, 2014 08:00 PM

June 08, 2014

Joachim Breitner

ZuriHac 2014

I’m writing this on the train back from the ZuriHac Haskell Hackathon in Zürich, generously sponsored by Better and Google. My goal for this event was to attract new people to work on GHC, the Haskell compiler, so I announced a „GHC bugsquashing project“. I collected a few seemingly simple ticket that have a good effort/reward ratio for beginners and encouraged those who showed up to pick one to work on.

Roughly six people started, and four actually worked on GHC on all three days. The biggest hurdle for them was to get GHC built for the first time, especially those using a Mac or Windows. They also had to learn to avoid recompilation of the whole compiler, which takes an annoying amount of time (~30 minutes for most people). But once such hurdles weren taken all of them managed to find their way around the source code to the place they need to touch and were able to produce a patch, some of which are already merged into GHC master. When I wasn’t giving tips and hints I was working on various small tickets myself, but nothing of great impact. I very much hope that this event will pay off and one or two of the newcomers end up being regular contributors to GHC.

We took breaks from our respective projects to listen to interesting talks by Edward Kmett and Simon Marlow, and on Saturday evening we all went to the shores of the Zurisee and had a nice Barbecue. It was a good opportunity to get into contact with more of the attendees (the hacking itself was separated in multiple smaller office rooms) and I was happy to hear about people having read my recent Call Arity paper, and even found it valuable.

Thanks to the organizers and sponsors for this nice opportunity!

by nomeata (mail@joachim-breitner.de) at June 08, 2014 07:34 PM

May 28, 2014

Joachim Breitner

Predicting the livetime of a Hackage package

The Debian Haskell Group has no proper policy about when to update a certain package to a new version from Hackage. So far, we upgrade when one of us personally needs something, when someone nudges us, if its required as a dependency or just when we feel like it. I was thinking about ways to improve that.

One thing that we should definitely do is to upgrade to new versions that differ only in the forth version number, e.g. from 1.2.3.4 to 1.2.3.5 – these are most likely bug fix uploads and have little risk of breaking things. (Unless they are only changes to the .cabal file, then they might not be an improvement for our users or us.) I plan to code that soon.

But what else can we do? Ideally we’d package versions that will be the newest version for a long time, and not versions that are going to be replaced the next day. Unfortunately, deciding that requires visionary powers. But maybe there is a correlation between the upload history and the lifetime of a new package? Maybe there are patterns, e.g. the first upload after a long time tends to be replaced fast, but the third package in a short succession has a high chance to live long? Can we predict the livetime of a freshly uploaded package? So after a bit of hacking I got this graphic:

It needs a bit explanation: Both axis are time differences, the picture is one year by one year. For every release of which we know the lifetime (i.e. there has been an upload later), we draw its history on a vertical line. The horizontal position of the line corresponds to the lifetime of the release: A package that was superseded immediately later (which I sometimes do after spotting annoying typos) would appear on the far left, a package that is stable for one year on the far right.

The history itself is a series of dots, representing the previous uploads of that package, with their distance from the lower edge indicating the time that has passed since then. So if a package had two updates half a year ago, and then no update for another half year, it would contribute two dots right above each other in the middle of the picture.

Unfortunately, the picture does not yield any insight, besides that short-lived packages are more frequent than long-lived packages.

So I tried another view:

I grouped uploads by the livetime of their two preceding uploads. For each such groups, the circle indicates the average livetime. The darkness indicates the absolute number in the sample. So we see a correlation between the packages livetime and the livetime of its predecessor, which is also not very surprising. We can state some hypothesis, like: “A package replacing a very old package is likely to be long-lived if its pre-predecessor lived very long or very shortly, but less so if that lived for a few months.“ But I’m not sure of the significance of these.

I could have also taken into account which uploads are major and which are minor, by looking at the version number, but I didn’t.

What’s the conclusion? Nothing much. I got some funny looking graphs. And there needs to be a way to render pictures like the first within the axes of a Chart diagram. I put the (somewhat hackish) code online – feel free to play with it.

by nomeata (mail@joachim-breitner.de) at May 28, 2014 09:43 PM

May 26, 2014

Joachim Breitner

Does list fusion work?

I’m writing this in the lunch break of TFP in Soesterberg. The invited talk this morning was by Geoffrey Mainland, and he talked about the difficulties of (informal) reasoning about performance in high-level languages like Haskell, especially with fancy stuff in the compiler like fusion. So I couldn’t help but think about a (very small) help here.

Consider the the two very similar expressions foldl (+) 0 [0..1000] and foldr (+) 0 [0..1000]. Which of these fuse away the list? Hopefully both, but hard to predict.

So with my list-fusion-probe library, you can write

import Data.List.Fusion.Probe (fuseThis)
main = print $ foldr (+) 0 (fuseThis [0..1001])

and find out. If you compile this (with -O!), it will print

500500

If you change the foldr to foldl, it will print

Test: fuseThis: List did not fuse

So you can see that the function fuseThis :: [a] -> [a] does nothing if the list gets fused away, but causes a run-time error if not. It allows you to annotate your code with your assumptions of list fusion, and get shouted at if your assumptions are wrong.

It wouldn’t be hard to have the compiler give a warning or error message at compile time; we’d just need to introduce a special function abortCompilation that, when found in the code during compilation, does just that.

Note that you’ll have trouble reproducing the above in GHC HEAD, where foldl does fuse (which is what I’m going to talk about tomorrow here).

by nomeata (mail@joachim-breitner.de) at May 26, 2014 12:10 PM

May 09, 2014

Joachim Breitner

Going to TFP 2014

Near the end of my internship with Simon Peyton Jones at MSR Cambridge I tackled the problem that foldl is not a good consumer in the sense of list fusion, as the resulting code compiles quite badly. I found an analysis that would allow GHC to safely do the required transformation to fix this in the common case; I dubbed this analysis Call Arity. The code is in GHC master (but not in 7.8), and I get to present at the Trends in Functional Programming conference in Soesterburg in 2½ weeks. If you are curious you can either look at the code in CallArity.hs or the submitted paper, which yet has to go through the formal post-conference peer review in order to be officially accepted.

If you are going to TFP as well and want to get your GPG key signed, just talk to me there!

by nomeata (mail@joachim-breitner.de) at May 09, 2014 07:59 AM

March 06, 2014

Kwasi Kwakwa

We are not supposed to be here

So… today is the 57th anniversary of Ghana’s independence, and as a Ghanaian citizen, it is a day I always approach with very mixed feelings. I’ve been thinking about how to write some version of this piece for a while. I’ve always found some excuse not to write it though, so while it is late this year, here it is.

<iframe class="youtube-player" frameborder="0" height="362" src="http://www.youtube.com/embed/b2903pxjYrc?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;start=133&amp;wmode=transparent" type="text/html" width="590"></iframe>

I’m going to start with the video of Kwame Nkrumah’s speech at midnight on independence day in 1957. Growing up, I saw this on TV and heard it on the radio so many times I can probably quote it by heart. Today is a good day to discuss the wider context of what Nkrumah meant when he spoke about the new African who would show the world that the black man could manage his own affairs. Quite simply, we were not supposed to make it.

The argument against giving African countries their freedom, outside of the blatantly economic ones, started and ended with the idea that we couldn’t run our own countries. We weren’t smart enough. We lacked the strength of character. We would steal from each other. We would descend into some kind of tribal free-for all and massacre each other over the the littlest things. We obviously couldn’t do things like vote peacefully, organize governments, open and run universities, live peacefully with each other and show kindness to our neighbours. We were capable of little more than the worst excesses you would expect from a people who were not quite human. Basically, the entire continent is supposed to be Mad Max meets the worst excesses of all the civil wars on it combined. That’s not quite how things have happened.

I’m not saying that things are perfect. Ghana has gone through waves of spectacular mismanagement and outright thievery, but we’ve also gone from being scared to speak out against our leaders to doing so openly. We still don’t treat each other with the dignity we should more often than not, but there are lots of people who show extraordinary grace and selflessness to each other on a daily basis. Children die who should be alive, but a lot fewer than used to. Adults die who should be alive, but again, a lot fewer than used to. We don’t educate enough of our kids, and too many are stuck in substandard schools, but we do have more schools and we have our own universities. We train our own doctors, even if we then underfund them. We train our own scientists, our own writers, our own lawyers, our own engineers, our own artists. Not enough of them, but more than we would have had otherwise. We are far below our potential, but it is a much greater potential than anyone expected of us. If we judged ourselves by the standards of what was expected of us, we’d already be a success. We don’t though, because under all the self-deprecation and self-loathing, we know we are capable of more.

We aren’t supposed to be here, I’m not supposed to be here. And sometimes it helps to take a step away from all that feels wrong and terrible to appreciate all that is right. The mess will still be there tomorrow.

Happy Birthday Ghana.


by kwasi at March 06, 2014 10:17 PM

February 15, 2014

Henry Addo

Android 4.4+ SMS API Changes

It been a while since KitKat was released to the wild. There have been huge improvements to the Android platform. This means new and broken APIs have been shipped. There have been tremendous changes in the SMS API more so a pain to work with as a developer(the documentation on the changes aren’t good and clear enough) but as a user, security wise, the changes are great. If you’re a developer and you’ve some sort of SMS based app, you surely have to make changes to your code to get your app to behave sanely on KitKat(v4.4) and beyond(v.4.4+).

As the main maintainer of SMSSync (there are volunteer maintainers as well), I have successfully ported it to work on both v4.4+ and pre-v4.4 releases. I’m going to share what I have come to understand with the changes in the SMS API.

Receive and Send SMS

To receive SMS with the API changes, you’ll have to declare in your manifest a broadcast receiver which has the intent-filter android.provider.Telephony.SMS_DELIVER and must also require the BROADCAST_SMS permission. With pre kitkat releases, you don’t need the intent-filter SMS_DELIVER and the BROADCAST_SMS permission. To support both v4.4+ and pre-v4.4 releases, this is what I did. As they say, code speak louder than words.

<script src="https://gist.github.com/8975696.js"></script><noscript>
<!-- Receiver for pre kitkat. This is disabled when it's kitkat and above -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiver" android:enabled="@bool/is_pre_kitkat" >
    <intent-filter>
       <action android:name="android.provider.Telephony.SMS_RECEIVED" />
    </intent-filter>
</receiver>

<!-- Receiver for kitkat. This is disabled when it's pre-kitkat release -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiverKitKat"
   android:enabled="@bool/is_kitkat" android:permission="android.permission.BROADCAST_SMS" >
    <intent-filter>
        <action android:name="android.provider.Telephony.SMS_DELIVER" />
    </intent-filter>
</receiver>
</noscript>

Make App Default SMS app

If you want your app to be listed as an SMS app so it can be configured(from system settings) to be the default SMS app on the phone, then you have to implement these in your manifest file. All four actually.
<script src="https://gist.github.com/8973733.js"></script><noscript>

<manifest>
    ...
    <application>
        <!-- BroadcastReceiver that listens for incoming SMS messages -->
        <receiver android:name=".SmsReceiver"
                android:permission="android.permission.BROADCAST_SMS">
            <intent-filter>
                <action android:name="android.provider.Telephony.SMS_DELIVER" />
            </intent-filter>
        </receiver>

        <!-- BroadcastReceiver that listens for incoming MMS messages -->
        <receiver android:name=".MmsReceiver"
            android:permission="android.permission.BROADCAST_WAP_PUSH">
            <intent-filter>
                <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
                <data android:mimeType="application/vnd.wap.mms-message" />
            </intent-filter>
        </receiver>

        <!-- Activity that allows the user to send new SMS/MMS messages -->
        <activity android:name=".ComposeSmsActivity" >
            <intent-filter>
                <action android:name="android.intent.action.SEND" />                
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />
            </intent-filter>
        </activity>

        <!-- Service that delivers messages from the phone "quick response" -->
        <service android:name=".HeadlessSmsSendService"
                 android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
                 android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />
            </intent-filter>
        </service>
    </application>
</manifest>
</noscript>

If your app say doesn’t support MMS you still have to declare dummy broadcast receiver class( the classs shouldn’t necessarily have to exist ) for it otherwise the app will not show up in the default SMS app list. The reason behind this is, Android expect your SMS app to implement all of these features if you’re asking your users to switch from the stock Messaging app to your SMS app. You should consider warning your users about missing features when they attempt to switch your app to be the default SMS app. This way they don’t expect all the core features from the stock Messaging app.

Making your app the default SMS app gives it access to the SMS Provider so you can write to it.

Also the limit for sending SMS has been reduced from 100 SMS per 1 hour to 30 SMS per 30 minutes on Android 4.x devices.

The post Android 4.4+ SMS API Changes appeared first on InfoZone.

by Henry Addo at February 15, 2014 07:35 AM

February 13, 2014

Henry Addo

OPSEC — You Can Care All About Security But…

Some OPSEC points lifted from the book REMOTE. You can care all about security but if you don’t apply some of these basic OPSEC points you will still be exposed.

  • All computers must use hard drive encryption.
  • Disable automatic login, require a password when waking from sleep and set the computer to automatically lock after ten inactive minutes.
  • Turn on encryption for all sites you visit aka HTTPS.
  • Make sure all smartphones and tablets use lock codes and can be wiped remotely.
  • Use a unique, generated, long-form password for each site you visit. Don’t use the same password for every login.
  • Turn on two-factor authentication whenever it’s available.

The post OPSEC — You Can Care All About Security But… appeared first on InfoZone.

by Henry Addo at February 13, 2014 08:57 AM

January 15, 2014

Henry Addo

Email From ‘Customer Care’

The email below just landed in my work inbox. Literally right in my inbox. I was hoping Gmail will flag it as spam with no trouble but that didn’t happen. It’s so easy for the naive and less tech savvy people like my mom to fall for this kind of message.

Subject: Customer Care

From email: <e1257757@live.com>

EMAIL SERVICE PROVIDER.
This message comes from your (EMAIL SERVICE PROVIDER) messaging admin center to All E-mail Account owners. We are currently improving our Database and E-mail Account Center and creating more certainty for our Legal Service clients. At this moment we are upgrading our data base so that there will be more space for new customers and increasing the surf on the Internet. To prevent your Email address not to be de-activated and to enable it upgraded, you need to assist us by sending the information below to enable us upgrade it, so that your email account status were flect in our database as a very active, useful and legal email account.Do send to us the below information to enable us upgrade your Account, else your email account will lost in a short time.
First Name:..
Last Name: ..
Date of Birth:..
Email Address:  ..
E-mail pass word:..
Alternative Email:..
Alternative  E-mail pass word:..
WARNING!!! E-MAIL OWNERS who refuses to upgrade his or her account within Five days after notification of this update will permanently be deleted from our data base and can also lead to malfunctioning of the client or user’s account and we will not be responsible for loosing our account.
Thanks for your understanding as it is geared towards serving you better.
Webmail Support Team
Warning Code: ID67565434.

How does providing you with these kind of information provide you more space for your customers and how does it even make you surf the web faster…

I have gone ahead and reported it as spam. Hopefully Gmail’s spam bot captures it the next time.

If you’re new or getting familiar with the internet, ignore anyone you don’t know or service that ask for confidential info such as username, email address, password, credit card or ask you to click on a link. Don’t fall for it. Most of these messages sound so legitimate that it’s easy to give what they ask for . If you’re not sure, always ask someone if it’s okay to provide such information.

 

The post Email From ‘Customer Care’ appeared first on InfoZone.

by Henry Addo at January 15, 2014 09:46 AM

December 08, 2013

Kwasi Kwakwa

On: Madiba

I’ve been having a really hard time writing about this. Because, well, what could I possibly say that would to the man justice?

What do you say when a giant of that stature dies? How can you possibly describe the man he was in a way that doesn’t fall short of who he really was and what he really did? Not saying there aren’t people who can do it, but I know better than to imagine I am one of them.

I will say this. While being a man, and therefore flawed, he was a better person under more trying circumstances than we has the right to demand of any human being. And I’d like to think that in being so he made the rest of us slightly better people too.

For that I thank him. And I hope we will someday be worthy of his example.


by kwasi at December 08, 2013 12:14 AM

November 14, 2013

Henry Addo

SMSSync v2.5 Released

pending-rotated-nexus4_framed
Happy to announce the immediate availability of SMSSync v2.5 on the Google Playstore. If you haven’t upgraded already please consider doing as this release come with exciting new features and bug fixes. Read more here

Huge thanks goes to our kind contributors.

Enjoy!

The post SMSSync v2.5 Released appeared first on InfoZone.

by Henry Addo at November 14, 2013 02:42 PM

November 12, 2013

Kwasi Kwakwa

I’m back….. For real this time. I promise…..

So… yeah, I’ve been a little absent for the last… *checks date on last post* 4 years it seems! Sorry about that. I’d claim the PhD as an excuse, but I could probably have found a way to keep writing regardless. I guess I just got tired of it and needed a break for a while. That said, I’m back for real this time people. I considered moving on from this place, but we kinda have history. And I’m stubborn.

So… what have I been up to since I last blogged? Well, I’m finally done with the PhD!

graduation

I graduated in July of this year with a doctorate in Physics from King’s College London and most of my family were around for what was a great moment in my life. The picture above is of me and the parents, who I owe immeasurable amounts to, even if I do a bad job of showing it from time to time.

Besides that, I did actually do other things. I didn’t read as much as I would have liked because of work, but I’m back to devouring books again, and it feels good, so expect more book reviews from me. I also kept up with judo. I would probably already have my black belt except for the fact that I’ve spent the vast majority of the last 2 years being massively inconsistent in my training. I did train quite a bit before that though, and compete too. The picture below is of my crowning achievement to date, a bronze medal in the kyu grade division (all grades below black belt) of the British University Games.

medal

I’m not done with the sport by a long shot though, so I still want more on that front.

Otherwise, I spent a lot of time in labs, analysing data, drawing graphs, giving presentations, writing papers, writing a thesis, defending it and looking for a job. There may have been some beer in there too. And I got a DSLR for christmas a year ago, so there may have been some terrible attempts at amateur photography too.

As for what I’m doing now, I somehow managed to convince a professor in one of the most prestigious research universities in the world that I know my stuff enough to work for him doing cool science(TM) so, barring British immigration deciding they don’t really like me, I’ll be working as a postdoc for the next 4 years. That means playing with microscopes, lasers, optical equipment, fast computers and squishy bits of biology. It should be all sorts of great.

As for what I’ll be talking about here… as usual it’ll be a mix of whatever comes to mind. I have some book reviews on tap, there’s a movie or two I want to talk about, there will be a lot more science (and an embarrassing amount of Neil Degrasse Tyson love) science fiction, technology, race, politics, sports…. Whatever makes me happy.

If you are still reading this after 4 years of silence, then thank you by the way. That was substantially more attention than I deserve. I’ll try to make it worth your while this time.


by kwasi at November 12, 2013 10:52 PM

December 14, 2012

Joachim Breitner

Plätzchentetris

What happens if the same person (in this case, my girlfriend) is both a bit geeky and likes to bake? She has ideas leading to this:

Tetris Biscuits

And what is the obvious thing to do with such biscuit (or are they cookies?). Play tetris:

(Also on YouTube if your browser does not play the video above.)

Oh, and to refute common stereotypes about me: The baking was done by me, but she helped me glazing the biscuits.

by nomeata (mail@joachim-breitner.de) at December 14, 2012 06:07 PM

October 30, 2011

Odzangba Dake

Iotop Crashes When Not Run As Root

Welcome to another an-update-broke-me-box post. Iotop now requires root access:

:~$ iotop -o
Traceback (most recent call last):
File "/usr/bin/iotop", line 16, in <module>
main()
File "/usr/lib/pymodules/python2.6/iotop/netlink.py", line 229, in recv
raise err
OSError: Netlink error: Operation not permitted (1)

To fix it, run iotop as root:

sudo iotop -o

There’s a lively debate here between the iotop author, Guillaume Chazarain, and Linus Torvalds  on the pros and cons of requiring root access for throughput statistics. It’s another linux developer classic with Linus using words like abortion, castration, disaster, utter crap… makes for a few laughs if you can spare a couple of minutes.


by Odzangba at October 30, 2011 06:01 PM

October 18, 2011

Odzangba Dake

How To Download Flash Videos On Ubuntu 11.04

It seems Adobe is on a mission to make downloading Flash videos as difficult as possible for those of us used to grabbing them from /tmp. A few weeks ago, I noticed Flash videos were no longer being saved in the /tmp directory. Instead, they were being placed in the browser’s cache folder… minor inconvenience, life goes on. After a recent update however, the files  are no longer being saved in the cache folder. A quick

lsof | grep -i flash

gave me:

plugin-co 26044          o   17u      REG        8,1  2020248     393786 /tmp/FlashXXxaK1Jq (deleted)

You guessed it… there is no file called FlashXXxaK1Jq in the /tmp directory. I see what you did there Adobe, nice one. I’ll spare you most of the technical details but the output indicates that the file is somewhere in the /proc directory. Using the process id 26044 (the second field in the output of the lsof command), we can hunt down the file FlashXXxaK1Jq in the /proc directory. So:

cd /proc/26044/fd ; ls -l | grep FlashXXxaK1Jq

will give you something like:

lrwx------ 1 o o 64 2011-10-18 10:30 17 -> /tmp/FlashXXxaK1Jq (deleted)

So the flash video is named 17 and being symlinked in a sneaky manner to /tmp/FlashXXxaK1Jq (deleted). Now do something like:

cp 17 ~/Videos/funny-youtube-video.flv

and you’re done. Go back to your Videos folder and watch that cat playing the piano to your heart’s content.

And now, I must cover my tuchis so here goes… downloading copyrighted material may be illegal where you live.


by Odzangba at October 18, 2011 12:11 PM

May 15, 2011

Odzangba Dake

How To Ping NETBIOS Names On Ubuntu

I make heavy use of the ping utility on a daily basis and it absolutely galls me that Ubuntu cannot ping hostnames by default. I need to use the nmblookup utility to find the ip address of the machine I want to ping and then ping that ip address… primitive, silly, unnecessarily complex… I feel a rant about idiotic default settings and legal gymnastics surrounding the universe repository coming up so I’ll just get on with the post. :D

1) Back up and edit the /etc/nsswitch.conf file by copying and pasting the following commands:

sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.original

gksu gedit /etc/nsswitch.conf

2) Add wins to the hosts directive:

hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4

3) Install WINBIND:

sudo apt-get install winbind

4) Ping away. :)


by Odzangba at May 15, 2011 12:40 AM

May 14, 2011

Odzangba Dake

How To Restore GRUB On Ubuntu 11.04

Since version 9.10, Ubuntu uses the GRUB2 boot loader and manager on clean installs. This means my earlier post on how to restore GRUB will not work properly. To restore the boot loader on these versions of Ubuntu (and possibly any debian-based linux distribution that uses GRUB2), you need an Ubuntu 11.04 live disk. The 10.10 live disks will work too… any ubuntu live disk that uses GRUB2 will work. Fire up a terminal once the live disk finishes loading and enter the following commands:

I) Let’s find where Ubuntu is installed on your hard disk:

sudo fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 83 Linux
/dev/sda2 2612 60279 463218210 83 Linux
/dev/sda3 60280 60801 4192965 82 Linux swap / Solaris

My ubuntu partition is /dev/sda1 (it has the asterisk under Boot).

II) Armed with this information, mount the Ubuntu partition:

sudo mount /dev/sda1 /mnt

III) Install the GRUB2 boot loader:

sudo grub-install --root-directory=/mnt /dev/sda

That’s /dev/sda — the hard disk itself, not the ubuntu partition – /dev/sda1.

IV) Unmount the Ubuntu partition and restart the computer like so:

sudo umount /dev/sda1 ; sudo reboot

V) If you have more than one OS installed, re-detect OSes like so:

sudo update-grub

That’s it.


by Odzangba at May 14, 2011 11:37 PM

January 11, 2011

Odzangba Dake

Manage Multiple Computers With Synergy

It’s lightweight, cross-platform and allows me to share one keyboard and mouse among several networked computers…

Synergy Desktop

and it’s called Synergy. Visit the download page and grab the appropriate installers. Click here for instructions on how to configure your dekstops. Ubuntu users can avoid a text configuration file by installing a GUI configuration app like so:

sudo apt-get install quicksynergy

Have fun. :)


by Odzangba at January 11, 2011 05:02 PM

June 29, 2010

Kofi Boakye

I love my country

It had to take the on going world cup to really bring the fact home to me …but i really love my country, mother land and land of my birth , the black star of Africa…GHANA…GHANA (GH) totally rocks…Go Black Stars and make the whole Africa proud


by kdex at June 29, 2010 02:21 PM

November 16, 2009

George Gyau

Is been a long time

Is been like ages since i blogged. Is been crazy for me since i got back to Ghana, land of my birth. but i am finally in control and want to start blogging seriously. expect more now.

Currently moved this BLOG to http://www.egoleo.net


by egoleo at November 16, 2009 10:58 AM

October 06, 2009

Kofi Boakye

The Global Village

If the world is now a global village, then I guess Aunt Araba can go and spy on what Mrs Obama is cooking for supper nd we the village elders sit and drink some pito with Osama and Gordon Brown while the German chancellor plays ampe with Sirleaf Johnson.Now where r the power chaskele boys , Mugabe and Wen Jiabao??

ah these boy paa !!

(Memoirs of a global village elder)


by kdex at October 06, 2009 02:19 PM

Karmic Kaola Goodness !!

Wow!!

Just spent over three hours downloading the Karmic Kaola beta  over a crappy wireless connection.

And I just got to shout “Wow!!”. Beta saf be this. Man, they really put some good work into this stuff.Little touches here and there . And I think my screen display just increased or something cuz there seems to be more space on the desktop. No kidding !! It is really worth the long wait , short fevered naps and the ever present angelically annoying mosquitoes buzzing and taking painful dives at my body…Karmic Kaola rocks , though there’s still more work to be done..And this time I hope to be part of it contributing my quota to it!!

Screenshot


by kdex at October 06, 2009 06:50 AM

September 19, 2009

Kofi Boakye

From Gnome to KDE and back again

First cut is the deepest as they say and its really

I tried KDE 4.3 over the week and I must admit they got some bling,bling. Wow!! Great work, guys and ladies.. The panel looked more spacious and the various effects and widgets/ plasmoids were just amazing !! And the preview effects in Dolphin were just over the top. (Top that if u can, Windows 7)

But then ,bam, without any warning stuff just started to mess up .First it was my Intel graphics cards not agreeing with compiz.(though KDE still looked good and handled ok without the bling,bling) Then KPackage Kit just made me boil with its interface. I mean, if I want to go through the list of available and installed software I d**n well want to see it all without typing keywords to get a list. sheesh!! Of course it just made me love Synaptic all the more)

Finally I just gave up and guiltily run back to Gnome. So simple!

Of course I’m waiting with huge anticipation for the final version of Karmic Kaola. Even the Alpha releases do show some serious improvements that  make me swell extra extra with pride at being a linux user. Go Karmic Kaola team!! All the best !!

After Karmic , I’m definitely gonna become a full time evangelist for Linux Usage in Ghana….


by kdex at September 19, 2009 10:05 PM

July 01, 2009

Kofi Boakye

Back Again !!

Hello World

Its sure been a while since i last posted on this blog.

However i’m back and this time i hope to put up new stuff everyday about what i’m currently doing .Hoping to start releasing some serious apps for the linux world soon.

Adios amigos


by kdex at July 01, 2009 05:47 PM

March 05, 2009

Kwasi Kwakwa

What else I’ve been watching

I started this post when I was talking about The Wire, I figured I’d put out a list of what else has been keeping my attention TV wise these days. Its late, but I already wrote most of it so I figured why not. I’m not really a huge TV person, never have been. I tend to time-shift my shows and then watch them when I’m not doing anything else, which usually ends up being late at night.

  • Battlestar Galactica: This has been one of my favourite television shows of the last few years and is now heading towards an ending. If you haven’t seen any of it, you should have. Its really, really good. Basically its a rimagining of on old science fiction show in which the human race is wiped out my a race of machines we’ve created and the survivors are forced to run for their lives while being hunted by the same machines. Along the way thugh it becomes a great meditation on the nature of humanity, morality, religion etc. Its science fiction at its upper end. I recommend highly.
  • Big Bang Theory: This I was determined not to like. Its a sitcom about a pair of socially awkward physicists and their friends. I pretty much expected that the writers would settle for the dumbest possible nerd stereotypes, add no real depth and screw the story up. Instead, they kept the stereotypes but managed to add enough depth and authenticity to make them real people. Interestingly enough, there are quire a few scientists I know who are followers of the show because of how well its written and the inside jokes it throws our way. Also recommended
  • The Unit: Dennis Haysbert shooting people and looking cool in the process. Need I say more? Its a bit on heavy handed in its stance at times,but its great pulp action and good acting. All things I’m partial to.

Other stuff I’m watching but not so keen on writing a short paragraph about, Mobile Suit Gundam 00 and  the new season of Hajime No Ippo (yes, I like anime. It doesn’t say geek up there because I couldn’t come up with another name)

I was also watching Dr. Who and Torchwood until both seasons ended. I’m really, really waiting for them to start back up again, even though they shall no longer be servicing my Freema Agyeman crush. Again, if you are a science fiction fan and not watching these, your loss. Majorly.


by kwasi at March 05, 2009 11:00 PM

March 04, 2009

Kwasi Kwakwa

In which the absentee host returns. Again

A very belated happy new year to you people. Apologies for the long absences. Again. At this point I’m pretty sure I’m down to just the people who forgot to remove me from their feed readers.

Quick Updates on what I’ve been up to:

I was officially awarded my Masters by Research in Physics. My parents and big sister were in town for my graduation and that will easily pass for my best day this year. Since then I’ve gotten accepted into a physics PhD program with the same advisor at the same university. 3 more years of this and I get to walk across a stage again in a gown with a hood on it and put ‘Doctor’ on my business cards.

On the Physical side. I persist with my judo and have now logged hundreds of hours of being thrown around, pinned, choked and armlocked. On good days I get to do the same to other people. In a little under 2 weeks I get to compete in the BUCS(British Universities and Colleges Sport) kyu grade competition. Hopefully all that work will end up in me getting a few good throws. Either way there will be pictures and maybe even video. At some point before I get the PhD I want to get my first dan(black belt)

Otherwise, I live in London, I study, I train, I hang out with friends, I still read too much, I watch the odd movie and life continues.

There’s a bit of a backlog of topics I was planning to write about but never got around to. Some will make it out in the coming weeks, some won’t. Either way, keep me in your readers people. If nothing else I need the touch typing practice


by kwasi at March 04, 2009 11:43 PM

September 08, 2008

George Gyau

How do I disable the ping response?

Usually a ping is used to check if a machine is up and to check the network status.

It is a small network packet sent to the machine. If the machine is up, an answer will be sent. The time needed to get the answer is called ping time or round-trip time.

The ping response from an IP indicates the machine is up.

Unfortunately this can be used to quickly scan an IP-range for reachable hosts.

This can be used to find potential hackable machines. If your machine doesn’t answer to pings, your chance to be seen is reduced. (That doesn’t mean your machine is more secure, the machine is just not that easy to be seen from the internet. Nothing more.)

Add the following line to your init script for the network (the name depends on the distribution you use):

echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

This disables ping responses.

To reenable, use the following command:

echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

To make this permanent set the following into /etc/sysctl.conf (if you have such a file)

net.ipv4.conf.icmp_echo_ignore_all = 1


by egoleo at September 08, 2008 03:37 PM

Custom teaser length by View using node.tpl.php

I have been working on this project, http://www.newsafrican.com which is a news site which focuses on everything african news. This project is been built on the Drupal CMS which is very flexible arguably.

I got into a situation where i have to customise the teaser length by View which happens to be one of the Drupal modules using node.tpl.php.

One way to vary teaser lengths is to check the current View with a modified node.tpl.php modify the output based on this

In this example a teaser of length 75 or 150 will be shown for the Views “frontpage” and “ghana_page” respectively.

I worked on this for Drupal 5 with the help of the good guys in the drupal IRC rooms, my solution is below. But this is a solution for Drupal 6 by friends on the drupal-support channel of IRC.

<div class="node<?php print ($sticky) ? " sticky" : ""; ?>">
<?php if ($page == 0): ?>
<?php else: ?>
<?php print $picture ?>
<em class="info"><?php print $submitted ?></em>
<?php endif; ?>

<?php
global $current_view;
if(
$teaser) {
if(
$current_view->name == ‘frontpage’)
{
?>

<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item['view'] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content['body']['#value'];
}

if($current_view->name == ‘ghana_page’)
{
?>
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item['view'] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content['body']['#value'];
}

if($current_view->name == ‘africa_page’)
{
?>
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item['view'] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content['body']['#value'];
}
if(
$current_view->name == ‘business_page’)
{
?>

<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item['view'] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content['body']['#value'];
}

if($current_view->name == ‘gh1′ || $current_view->name == ‘gh2′)
{
?>
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item['view'] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print substr($node->content['body']['#value'], 0, 90). ‘&nbsp;’;
?>
<a href=”<?php print $node_url ?>” title=”read more”>read more</a><?php
}
} else {
print
$content;
}
?>


by egoleo at September 08, 2008 05:23 AM

September 02, 2008

George Gyau

S Leone president declares assets

President Ernest Bai Koroma has become the first head of state in Sierra Leone to declare his assets to the country’s Anti-Corruption Commission.

As i read this news item, i was wondering when all other African leaders will do follow this. Expecially in Ghana were there is been much talk about such a thing. We always here leaders saying i already had my money or wealth before i came to power.

Koroma, i hope this will not be a nine day wonder, but to go beyond that let things work in S-Leone.


by egoleo at September 02, 2008 05:11 AM

Google launches internet browser

Google is launching an open source web browser to compete with Internet Explorer and Firefox.

The browser is designed to be lightweight and fast, and to cope with the next generation of web applications that rely on graphics and multimedia.

Called Chrome, it will launch as a beta for Windows machines in 100 countries, with Mac and Linux versions to come.

“We realised… we needed to completely rethink the browser,” said Google’s Sundar Pichai in a blog post.

The new browser will help Google take advantage of developments it is pushing online in rich web applications that are challenging traditional desktop programs.

Just waiting to try it out. :)


by egoleo at September 02, 2008 05:00 AM

December 22, 2006

Lorenzo E. Danielsson

Sign this

I finally did the right thing by going here and signing Bruce Perens’ petition against the Novell-Microsoft deal which everybody is talking about. If you value the freedom to write and share software, please read up carefully on the implications of this deal and, if you feel that Novell’s deal with Microsoft is a threat to those freedoms, do sign the petition as well.


by lorenzod at December 22, 2006 09:04 AM

Seasonal greetings

Today is the last work day before the holidays so Happy Yule everybody.


by lorenzod at December 22, 2006 07:32 AM

December 21, 2006

Lorenzo E. Danielsson

Vad i helvete..?

Idiot!

Hur kan någon vara så genomkorkad? Jag är givetvis 100% emot dödstraff, men om det skulle bli infört hoppas jag att “författare” som David Anderson blir de första in i gaskammaren. Men lyckligtvis kommer inte dödstraffet tillbaka så jag rekommenderar instället tjära och fjädrar.

Så vilka brott skulle dödstraff utdömas för? “De allra grövsta brotten”. Terrorism är ett exemples som ges. Okej, det kan jag gå med på att det är ett grovt brott. Och i så fall borde vi omedelbart hänga två superterrorister, nämligen Busken och hans pudel, Tony B. Liar.

För övrigt anser Anderson att landsförräderi och högförädderi är grova brott för vilket dödstraff borde utdömas. Eh, ursäkta mig? Landsförräderi???? Det är ju så idiotiskt att jag saknar ord. När blev det ett grovt brott? Nu när jag kommer att tänka på det, när blev det ett brott över huvudtaget?

Förbannade idiot!


by lorenzod at December 21, 2006 07:57 AM

December 18, 2006

Lorenzo E. Danielsson

Hilarious

Yeah, yeah, so God hates Sweden, so what? Sweden hates God as well.


by lorenzod at December 18, 2006 08:39 AM

December 14, 2006

Lorenzo E. Danielsson

Regn export

Eftersom ni i Sverige har överskott på regn, kan ni inte skicka lite till oss? I Ghana är det hett och torrt. Lite regn skulle verkligen hjälpa.


by lorenzod at December 14, 2006 08:17 AM