Home > >

Linux system info with inxi

Fri Dec 15 2017 01:00:00 GMT+0100 (Central European Standard Time)

Quickly to remind my future-self: Use inxi to gather system info. Install via 'wget -Nc smxi.org/inxi && chmod +x inxi' and run with './inxi -F'.

Apple devices (MacBook Pro) and 5 GHz WiFi access points (Ubiquiti NanoStation)

Thu May 19 2016 02:00:00 GMT+0200 (Central European Summer Time)

Deploying 5 GHz NanoStations as 'end-user access points' always gave some 'hiccups' with various Apple MacBooks. Usually they could see the signal, but were never able to connect to it. Finally with these settings they hooked up:

  • Disable airMAX
  • Set Country code to US
  • Channel width 20 MHz
  • Frequency 5785 MHz
  • Wifi security WPA2-AES

I simply assume that not all of these settings are required, but I'm simply too lazy to see which ones are required and which ones are optional.

Migrate Windows (XP) guests from VMware Fusion to Virtual Box

Mon Jan 04 2016 01:00:00 GMT+0100 (Central European Standard Time)

Kind of outdated toolset, but just that I don't forget it...

I still had some old VMware Fusion 6.0.6 virtual machines laying around on my Mac OS X 10.9.5. As I was recently using more advanced Virtual Box features, I decided to unify all virtual machine instances with Virtual Box. Turned out this is straight forward, if only you know what you do!

  1. First of all delete unneeded snapshots as they couldn't be migrated anyways.
  2. Then uninstall the VMware Tools (Guest additions).
  3. Get Disk2VHD from Microsoft Technet
  4. Export the VHD image with disabled VHDx from within the VM you want to migrate
  5. Create a new Virtual Box instance, instead of creating a new disk attach the VHD file as harddisk
  6. Enable IO-APIC
  7. Start up the VM and install Virtual Box guest additions

That's it.

WTF Apple?

Wed Jan 23 2013 01:00:00 GMT+0100 (Central European Standard Time)

So langsam reicht es. Die Apfel-Logo Company scheint wirklich alles falsch zu machen. Wie um alles in der Welt kann man dann immer noch so erfolgreich sein?

Nach ein paar Jahren nun erneut ein herantasten an die Apps Entwicklung. Ein erster Versuch ist schon damals mit einem der ersten iPod Touchs misslungen. Dabei schrie der standardmäßige gähnend leere Startscreen mit nur 4 oder 5 Icons in dem 4x4 Raster geradezu danach, mit eigenen Apps ge-pimpt zu werden. Aber ne, damals wollte Apple nicht mal nen SDK rausbringen. Dann gab es das, aber bloss für MacOS. Seitdem haben sich noch ein MacBook sowie ein iPad 2 Zeit im Haus angesammelt. Und kürzlich bestand sogar die Chance, beruflich einen Protoypen auf iOS zu platzieren.

Also frisch ans Werk. Eigentlich braucht es ja nur Xcode und schon geht's os. Ach ne, ich vergass. Mein MacOS 10.6 wird nicht mehr unterstützt von der aktuellen Xcode Version. Also müsste ich erstmal MacOS aktualisieren. Keine 3 Jahre alt, schon unbrauchbar: What the fuck?

Aber selbst wenn das erfolgt, dann ist mein iPod schon Elektronik-Schrott. Denn der wird schon lange nicht mehr unterstützt. Dabei fiel mir auf, dass einige 3rd Party Apps Apps, die noch auf dem iPod waren, meinten ein dringendes Update einspielen zu müssen. Ohne das würden diese nicht mehr funktionieren. Doch der App Store meinte nur noch, dass iOS erstmal aktualisiert werden müsse, dies aber leider nicht mehr geht. Also: keine 4 Jahres altes Gerät - nicht mehr zu gebrauchen und auch nicht mehr selbst zu entwicklen. What the fuck.

Kein Wunder, dass die Äpfel-Männer so viel Geld haben. Wenn immer alle willenlos und megageil auf das 'nächste Ding' warten. Und dabei bevorzugt um Mitternacht Schlangen bilden und ihr Geld auszugeben. Die ersten ausgemusterten iPhones wurden schon hinterm Busch in Afrika gesichtet. Die Elektronik-Müllhalden von heute werden nix gegen die iPhone- und iPad-Berge der nächsten Jahre. Natürlich hilft es, dass wir die nicht direkt vor *unserer* Haustür sehen und zerlegt sehen müssen. What the fuck!

Scheiße! Wacht auf und hört endlich auf, so geile Geräte zu bauen die nicht immer alle kaufen müssen!

Create static HTML pages from a local Wordpress installation

Tue Nov 13 2012 01:00:00 GMT+0100 (Central European Standard Time)

Wordpress is convenient when setting up a little web site / blog. You might even think about self-hosting instead of using the services from wordpress.com.

Doing so is easy, but also eats up resources on your system and even worse, opens the door of security holes. You need to think about a lot of things like file permissions, database access, web server config, the PHP subsystem. And of course Wordpress itself. So you need to update often. Over and over again.

If you are like me, then you don't. But always feel bad and that you should do something about it.

If you depend on many Wordpress plugins, then move on. This isn't for you. But if not, then why not setting up a local installation and simply fetch the static HTML pages generated by Wordpress and deploy them on a brain-dead simple static HTTP server?

Of course with this you remove all the dynamics of your system. I think comments could easily moved to an external service like disqus.com. And as I don't really like all these fancy widget changing content automatically all over, I see this purification as another advantage.

To jump-start your local installation, the wonders of virtualization came in handy for me. Among others TurnKey Linux provided a recent version of Wordpress running on a stripped down Linux. Deploying this to a virtual machine of your choice, migrating your old data from the live Wordpress over to the Turnkey installation is all you need.

Afterwards you can work completely locally on your Wordpress content and setup. Then simply invoke a script similar to the one below to automatize the update of your production system. And voila, you have a static mirror of your Wordpress content for free.

As a nice benefit you already get a local backup of your content in your virtual machine.

# mirrors and uploads a wordpress blog to a static web site 
# check http://x-ian.net for details

# my configs 
REMOTE_WORDPRESS=x-ian.net SSH_LOGIN=<your ssh credentials> 

# preparation 
cd /tmp rm -rf wordpress_mirror 
mkdir wordpress_mirror 
cd wordpress_mirror

# mirror of whole wordpress installation in static html pages 
wget --mirror -R xmlrpc.php,trackback http://$LOCAL_WORDPRESS

# replace remaining links with real server 
find ./$LOCAL_WORDPRESS -type f -exec sed -i "" "s/`echo $LOCAL_WORDPRESS`/`echo $REMOTE_WORDPRESS`/g" {} ;

# upload static html pages 
tar czf ../wordpress_mirror.tgz . 
scp ../wordpress_mirror.tgz $SSH_LOGIN: ssh $SSH_LOGIN "rm -rf x-ian.net; mkdir x-ian.net; cd x-ian.net; tar xzf ../wordpress_mirror.tgz"

# cleanup 
rm -rf /tmp/wordpress_mirror* 
ssh $SSH_LOGIN "rm wordpress_mirror.tgz"

APZUnet - Probably the biggest public WiFi hotspot in Malawi

Tue Nov 13 2012 01:00:00 GMT+0100 (Central European Standard Time)

For Abwenzi Pa Za Umoyo (APZU), Partners In Health' sister organization in Malawi, technology is playing its role in delivering health services and improving communities. IT services like access to computers and especially communication gets more important. Even (or especially) in rural places like the south-eastern District of Neno.

As one basic principle everybody gets access to the network - either government, APZU employees and to some extend private people. Of course this has the downside of potentially hurting commercial Internet cafes as many people throughout Neno Boma get Internet access for free. But a (relatively) fast and working Internet has a number of impacts on the work. Medical research, easy communication, and heck, sometimes it simply entertains...

Over the past few years the communication needs were growing rapidly. We have tried multiple approaches for the local network and the Internet connectivity and went through a couple of design generations. Usually just to realize that the reality was outgrowing our solution.

With the current network in Neno we are probably running the biggest public WiFi hotspot in Malawi. With a coverage of a half square mile and up to 120 unique systems utilizing the network on average.

Currently the system combines a couple of freely available software components together with carefully selected, inexpensive commodity hardware and 1.5 local engineers to keep everything up and running. As we have gained quite a bit of experience we feel that the current system will scale-up even beyond our expectations for the next 2 or 3 years. But TIA, you never know what's coming next.

Putting down all the details is a little bit too much for this post, so I only provide stuff for the buzzword bingo. Get in touch if you want to learn more about it:

  • Traffic accounting
  • User management
  • Local caching (among others esp. for Windows Updates)
  • Segmented network
  • Content filtering
  • Real-time monitoring
  • Bandwidth management

Of course such a system still costs money, but it seems well worth the price if the system is designed carefully. And as most of the components are free and the hardware costs are minimal, it basically comes down to the costs for the sat link (granted still fricking expensive in rural Africa) and your expertise.

How to print a book from a wordpress blog

Mon Nov 12 2012 01:00:00 GMT+0100 (Central European Standard Time)

Even in our digital world you might want to convert your wordpress blog into a paper book. Of course there are services available claiming to do so. But the ones I found didn’t match my specific requirements of

  • Minor content tweaks
  • Custom formatting
  • Inline comments
  • High resolution pictures for offline processing
  • Picture captions and mouse-over labels
  • DIY attitude

So after a lot of trial & error, I found out that I can

  1. export the wordpress content as XML,
  2. create a single page HTML file with all content locally,
  3. automatically tweak some styles,
  4. import the HTML into Word,
  5. re-format as needed,
  6. save as PDF and optionally create an eBook version.

If you want to follow my steps, you need these tools (highly ‚personalized’ and quite a bit developer-driven – it might not be the right process for you).

Export the wordpress content as XML Easily done through your Wordpress Dashboard.

Create a single page HTML file with all content locally Run the attached Ruby script to convert the WXR file into a single page HTML document. This is where most of the magic happens and also the most fragile part. The script is aligned to the elements I typically on my blogs and it might differ from others. But with a little bit f Ruby knowledge it shouldn't be too hard to tune this. Basically it takes the XML file, filters for the posted and published stories, tags the various elements with different HTML classes and has some processing around images to include captions and mouse-over titles. It returns the HTML on the console, so best is to invoke it like this: wordpress_to_single_html.rb 'your wordpress export' > single_html.html

Now the pictures are still on the wordpress server. Use Firefox to open the HTML and save it again with the option 'website complete' to have everything on your system (incl. pictures) for faster offline access.

Finally open the newly saved HTML file in a text editor and search&replace all relative img URLs with absolute paths (e.g. substitute 'myblog_files/ with file:///c/myblog_files/. This is sadly required for the Word import.

import the HTML into Word & reformat styles After opening/importing the HTML in Microsoft Word you can modify styles and ‚pimp’ the content as you want. Check for styles beginning with an _ created by the Ruby script to mark different elements of the blog (content, headings, comments, post_date, ...). Save as docx for future needs (and always keep the images folder with the docx).

save as PDF and optionally create an eBook version. Most print on demand services take a PDF, so simply save your document as a PDF. If you want to create an eBook version as well it you enter the ‚format hell’ for eBook content. Calibre seems to understand most formats and can also load the HTML export from Word to e.g. create a version in the epub format. (More general info about ebooks.)

That's all. Isn't it simple?

Note about Apple Pages: Using Apple Pages seems the more obivous choice for text processing on a Mac. However the recent Pages versions removed the HTML import. So there wasn’t an easy way to get the wordpress content nicely formatted into Pages. Two workarounds are available: One ist to simply copy&paste content from the safari and the other is to use TextEdit (which still has a HTML import) to create a RTFD (RTF including attachents) and then load it into Apges. Unfortunately all pictures are scaled up tot he full page and this makes it painful if you have plenty of pictures embedded.

Note about Microsoft Word for Mac: It turned out that my mac version had multiple hiccups with a few hundred pages of text and plenty of included pictures. Switching to Windows made it less stressful for me.

Note about Microsoft Word: Seems plain wrong to me that recent versions of Word have problems with images you want to link in. My impression is that if you include a picture via a link to an external file, Word creates an absolute file path reference to this. Of course this makes it impossible to move the document and files around – even on your own local system. And when trying to embed to files right into the docx (which of course can seriously bloat the file size up), at least form e many pictures changed the scaling. Some oft hem were even uglily transformed.

Gmail and IMAP - an odd couple: How gmail plays nicely with IMAP

Sat Nov 03 2012 01:00:00 GMT+0100 (Central European Standard Time)

Lots has been written about it. There is even an official guideline provided by Google. Many different ways to use it, but fact is that the default config is bloody useless. Partially because IMAP only knows hierarchical folders and gmail has labels, partially because IMAP has a few underspecified parts.

Here are my 2 cents of hands-on configuration for IMAP clients like Apple Mail or Microsoft Outlook:

  • If you are on a mobile devices, use ActiveSync/Exchange connectivity. [Reason: increase your lifetime by reducing blood pressure]
  • Modify Labels in gmail via Settings. Deactivate 'Show in IMAP' at least for 'All mail', maybe also for 'Starred', 'Important', 'Chat' [Reason: Mails can be tagged with multiple labels and therefore show up in every folder derived from the labels. Hence a message tagged with more than one label will be duplicated in these folders.]
  • For custom labels use '[Gmail]/ as a prefix [Reason: This way they will show up underneath the Default folder path [Gmail] in your mail client.]
  • Consider deactivating 'store draft messages on server' [Reason: depending on your network this can slow down and eat up bandwidth together. Additionally it might happen that mails currently drafted and saved multiple times will show up as deleted mails whenever the auto save on the client happens.
  • Store sent messages on the server, Store junk messages on the server, and Move deleted messages to the Trash mailbox [Reason: keep these folders in sync with your gmail UI or other mail clients.]
  • Store deleted messages on the server and never permanently erase deleted messaged [Reason: Use the trash just like in gmail. But remember that gmail automatically deletes your trash after 30 days. So don't use your trash folder as your hidden archive!]
  • Consider using the IMAP Path prefix of [Gmail] as all the folders/labels are mapped under the folder [Gmail] in IMAP.
  • Tell your mail client which folders are used for Sent messages, Trash, Spam, Drafts. In Apple Mail right click in the corresponding Gmail folders and say: 'Use this mailbox for ...' [Reason: IMAP knows about folders, but doesn't standardize these special folders (apart from the Inbox). So one client might use 'Deleted messages, while another client might use 'Trash' to store deleted messages. This tells the mail client that it should use the same folder gmail uses.]

And now: Go and test it! Test it multiple times, in and out of every direction you can think of. Only use the setup if you are confident you didn't mess it up!

If your local mail client shows weird behavior after all these configs, invoke a Rebuild or Reconcile or however it is called from your client to re-sync mails with Gmail.

Making your EMR work in resource-poor settings

Sat Oct 20 2012 02:00:00 GMT+0200 (Central European Summer Time)

Lots has been written about EMRs. Most of it for the 'developed world' and most of it indicates that there are some 'issues' in making it work. Now how can someone think this can possibly work in resource-poor settings? Settings that constantly attract classifications like under-staffed, under-trained, under-paid, under-motivated, under-equipped?

Well, among a few others Partners In Health tries. In my role as the Medical Informatics Manager for APZU in Malawi we took the open source medical record system OpenMRS and were looking for ways to adapt it. Finally we could scale up and keep the system running. Even with the ongoing decentralization of clinical services when we went from 0 to 12 distributed, remote clinics and from 0 to thousands of patient records. At that time we might have had the only working EMR capturing the population of a whole District and being compliant to the guidelines for HIV services defined by the Ministry of Health in Malawi.

First lesson: Go local

If you look for an EMR for high-volume clinics in Malawi, get in touch with Baobab Health. They have the most complete set of tools for the health care sector in Malawi and were a constant source of inspiration.

Second lesson: Go OpenMRS

If you still find gaps and the need for other tools, or you aren't in Malawi, check out OpenMRS. But be aware and don't see it as a ready-to-be-used system. Health care systems can be different, so are users and particular workflows. Therefore a one-size-fits-all system might fail. OpenMRS tries to address this by providing a framework for building your own EMR. But a framework doesn't necessarily address your problems, your workflows, or your user skills off the shelf. Be prepared to adapt it. Just like for the 'western world', efficient, easy-to-use, simple, error-avoiding interfaces are the key, they are for resource-constraint environments. Maybe even more so.

Third lesson: Know your users (and your 'stakeholders')

To make it short: The current UI of OpenMRS 1.x ... sucks. A big part of data entry is ... well ... data entry. So make this easy and fool-proof. Otherwise you have a perfect example of GIGO.

  • Use common sense: It is sometimes surprisingly uncommon.
  • Start small and stay focused: 10 half-solved problems are nothing compared to 1 solved one.
  • Make data entry error- and fool-proof.
  • Say 'no'. Double question requirements from 'stakeholders' (whoever they might be) as they often have a vision beyond the scope and possibilities of your environment.
  • Simplify the UI: Simple things can already help. Try to bring the number of user interactions close to the number of words you need to describe an action. If you need 25 mouse-clicks for an activity like 'transfer this patient to another clinic' in the system, then go back to point #1.

Fourth lesson: KISS

Well known and often referred too. But almost as many times (cluelessly) ignored. Throw away stuff were you (or someone else!) feel that it might be interesting after X years (with X anything greater than 1) to look at Y. Yes, famous question of 'numbers of goats living in a household': YAGNI!

Fifth lesson: Setting up a system initially is hard, but keep it running is even harder.

This does not only apply to an EMR, but already to a clinic itself. Often little things can decide about winning or loosing. And in almost all cases it is not about the big upfront design of the form, but how you ensure that is going to be used over time. And if it is not used, then it is useless. Especially in environments where there is so much of 'nothing'. Don't waste time and energy. There are too many variations of 'no plain paper available', 'no batteries for weight scale', 'no drugs for a certain disease' to address all of them upfront. If you design it, be part of it the first 6 months. If you can't or don't want to, don't design it!

All of this is based on a couple of years of experience living and working in rural Malawi. It might be totally different for other, yet similar places. But always take it 'one day at a time'.


Additional remarks:

  • admitting failure (‘failure report’)
  • shut up and listen (and observe!)
  • donor driven instead of driven by beneficiaries
  • ‘whatever it takes’ is one problem

Rooting stock Kindle Fire 6.3 for Dummies

Fri Apr 20 2012 02:00:00 GMT+0200 (Central European Summer Time)

So, it turned out that I eventually couldn't leave my hands off the Kindle Fire. Of course I can claim that I need this toy to be evaluated for my job. But after buying it with my German credit card I found out that it is heavily locked into the Amazon hemisphere. Too bad that they accept my German credit card to buy the device, but not to get any content or apps from the Amazon App Store. So there is of course the natural motivation to free this from all this stuff. This is f'ed up - you Mofos.

Unfortunately it seems that the rooting exercise is a pretty big mess. During my first night I thought I already totally bricked my Fire. However after tons of 'research' (fancy word for reading too many articles which only contain part of the truth) I finally got the real summary. This and a fresh new Windows system finally brought my Fire back to life. And if this doesn't help, a physical USB Factory cable like this one should almost always do the trick.

Now I can explore the unlocked Android world and it might even be that I eventually really use this as a low-cost, high-quality remote data collection tool for my job. If not, I have at least one more blog post...

Amerikanisches MacBook mit deutschen Umlauten

Sun Sep 13 2009 02:00:00 GMT+0200 (Central European Summer Time)

Wie bringe ich einem amerikanischen Mac mit englischer Tastatur unsere heiß-geliebten deutschen Umlaute bei?

Darüber ist schon (zu?) viel geschrieben worden, also darf ich jetzt auch mal ran. Ich erspare mir hier eine ausführliche Auflistung möglicher Gründe, warum man als Kraut ein solches Gerät überhaupt hat (Software-Entwickler, Firmenangestellter, @, Ausnutzung von Währungsvorteilen).

Universell kann die Tastenkombinationen ⌥-u (option-u) gefolgt von dem jeweiligen Umlautbuchstaben benutzt werden, um landes-spezifische Umlaute einzugeben. Ein ⌥-u U erzeugt also ein Ü. Ferner bringt ein ⌥-s das ß hervor.

Mir ist das aber noch zuviel Getippe. Mit Ukulele habe ich mir die Tasten a, o, u, A, O, U in Verbindung mit der option Taste so umbelegt, dass Umlaute ohne Umweg über option-u direkt mittels ⌥-a, -o, -u, -A, -O, -U eingeben werden können.

Und weil so schön einfach ist, kommt das gleich noch auf ⌥-e.

Enough birthday stuff

Sun Jun 28 2009 02:00:00 GMT+0200 (Central European Summer Time)

Finally I solved all my struggles with my birthdays calendar at once. I just changed my OS... No more homegrown VBA macros to get what I want from Outlook.

Although I have to admin that even iCal and Addressbook from MacOS are not capable to manage more than 1 birthday per contact out of the box. But Birthday Scanner X comes to the rescue. And it's free.

If you're still interested in my Outlook macros and have problems, let me know. I will be mercy...

Everyone can start a business

Tue Apr 21 2009 02:00:00 GMT+0200 (Central European Summer Time)

Even his brother. So why not me?

Granted. I'm not the only head behind firstprinciplesmanagement.com, it is still in beta, and under construction at best,  but hey:

You have to start somewhere.

So if this flies off, then you might find more (personal) posts here.

Oh, and yes: Just another side built on Ruby on Rails.

It's about to start

Sat Apr 18 2009 02:00:00 GMT+0200 (Central European Summer Time)

A new blog for my simple thoughts; regarding my work and (some parts of) my private activities. Let's see if and how it grows.

Oh, and yes. Even though this is the very first post, I will add some entries with older dates. Just for me to not forget them. I know that I will fake the history, but hey, who cares?


May 1st, 2009 at 18:35 | #1Reply | Quote

…lonely comment…

Comments are closed.