September 11th, 2012 | Categories: Linux, Networking, Technology

For work I was migrating an old undocumented reverse proxy configuration from 2.0 to 2.2. It contained some old perl scripts nobody understood and some strange bits here an there.

Long story short I started from scratch. I ran into the usual problems like redirects and hyperlinks being broken if they use full self referencing URL’s.

As it happened one of the perl scripts was there to fix those, it was ugly, unreadable and not very efficient.

Ofcourse I first had to deal with the redirects not working, this is easily fixed using ProxyPassReverse

ProxyRequests off
ProxyPass               /       http://jms1:7801/
ProxyPassReverse        /       http://jms1:7801/

I would have liked to have used a Location container but it was not allowed too.

This however still leaves urls inside the html, css and javascript files.
My original attempt was to do this using mod_proxy_html which worked fine, however due to it slightly reformatting it broke the 3 out of the 4 applications. I have no control over them so I had to scrap that idea.

Not wanting to go the perl route again I remembered playing with mod_substitute. After some initial issues I got it working fine. It is a bit more aggressive than mod_proxy_html but it is acceptable.

FilterProvider DN_REPLACE_URLS SUBSTITUTE resp=Content-Type $text/
FilterProvider DN_REPLACE_URLS SUBSTITUTE resp=Content-Type $/xml
FilterProvider DN_REPLACE_URLS SUBSTITUTE resp=Content-Type $/json
FilterProvider DN_REPLACE_URLS SUBSTITUTE resp=Content-Type $/javascript

Substitute "s|http://jms1:7801/|/|in"

Hopefully this is useful for somebody else too.

Comments Off on Reverse Proxy and Hyperlinks
September 8th, 2012 | Categories: Hardware, Personal, Technology

I bought myself an Acer Aspire V5-571G, to replace my aging netbook. I ended up going for Acer’s low-end ultrabook because it was only around 35 EUR more expensive than a AMD Fusion netbook, it comes with and i3 with IGP and an additional GPU. So bang for buck it was a clear winner.

I know when I got Acer the build quality is not that great, but for the price I payed and my intended abuse it was a bargain.

So if you are looking for a cheap ultrabook but don’t mind plastic construction and a not so great keyboard, check it out.

I plan on running Windows 8 on it to play around, then I will probably try and get Solaris to run. Lots of fun to be had in the future!

Comments Off on Acer Aspire V5-571G
September 2nd, 2012 | Categories: Linux, Technology

I teased you all a while ago with my XMonad configuration. My Raspberry Pi and some other personal things have occupied my free time recently so I have not done any thing worth posting. So I finally took the time to wrap and tidy it up.

I decide to switch to XMonad because I recently revived my old netbook. It has a small screen resolution of 1024×600 so every pixel counts. I tried using XFCE, although I like it. I thought I could do better.

Bellow is a screenshot of my current configuration:

I basically have a few workspaces, some configured in the traditional tilting way, others are configured in borderless fullscreen mode to squeeze every pixel out of my screen real estate!

If you remember the old screenshot, not much has changed. It was mostly removing unneeded bits and cleaning up the configuration file. But if you look closely you can see that I now have a tray area. The dzen battery and wifi status text is still there. But it is covered by trayer, that way I can just use the GUI do to things. But I can easily kill trayer if I feel like it, without losing important information.

I’ve create a wiki article for XMonad here and I will create one for CDM here for those who are interested in this.


Comments Off on XMonad
August 28th, 2012 | Categories: Linux, Networking, Technology

I’ve been wanting to write about this for a bit. I usually VPN (to the gateway at home) for surfing when roaming. This also gives me access to my shellbox and with my ssh key. You can usually connect to port 443 (https) on most networks, even those that force you to use a socks or HTTP proxy.

However sometimes this is not possible. But if you are lucky you can still use ping and icmp. A simple check would be see if you can ping a server.

If you can ping your server, you can use it as a proxy. Throughput will be limited. But it’s better than nothing!

I’m doing this on CentOS and luckily RPMForge carries the ptunnel package. Installing was easy. Alternatively you can get the source here.

Below is how to install and start the server side, you could wrap this in an init script but I choose not to do so.

tokyo ~ # yum install ptunnel
tokyo ~ # ptunnel -x secretkeyhere -c eth0

You only need the -c if you have multiple interfaces.

Connecting with a client is easy too!

axion ~ # ptunnel -x secretkeyhere -p tokyo -lp 8000 -da nara -dp 22 -c eth0
axion ~ # ssh -p 8000

In the example above ssh will connect to nara on port 22 using tokyo as a proxy.

Of course you can use it to forward other ports. However, combine ssh with the dynamic port forwarding makes it very easy to get internet access.

Enjoy! And only use it for good 😉

August 20th, 2012 | Categories: Linux, Personal, Technology

Someone just asked what desktop environment I use. He didn’t like the new Gnome.
Those who know me well enough, will know I use a mac for my primary workstation. So I’m using aqua as my primary desktop environment.

I do run a lot of linux but none have xorg installed with the exception of my netbook. On my netbook I have a dual setup wit Xfce, because it reminds me of the good old days of gnome. And an xmonad setup.

I have not used the former much and I usually go to xmonad, it slowly grew on me over the years.

As you can see it is nothing to fancy, no tray, no wallpaper. Simple and functional. I will post the configuration for this at some point if you are interested. All you see in the screenshot is xmonad, dzen2 and conky.

In case you are wondering I use CDM for my Desktop Manager. I forgot to take a screenshot, but is is similar to the following one but green instead of blue.

Hopefully this satisfies your curiosity!

Comments Off on What desktop environment do I use?
August 17th, 2012 | Categories: Personal

Last year I switched from a Lowepro Voyager C strap to a BlackRapid RS-Sport. I like this combo a lot, especially if I’m only carrying my Camera and not much else. However I recently Purchased a Crumpler Messenger Boy Stripes 8000 as my new smaller camera bag to take with me on my trips.

I had my RS-Sport hooked to a Manfrotto RC2-Plate using there conversion kit (FastenR-T1) this works well when carrying just the camera.
However when using the Messenger Boy it became a hassle to always unhook my camera from the RS-Sport and store it. Storing it with the RS-Sport attached required just about as much effort.

I like the RS-Sport and wanted to continue using it, so I was looking around for a solution. I saw an advertisement in one of my photography magazines about the Camdaptor straps and adaptors kits for tripods. That would allow me to quickly store and take out the camera, have a good grip on it! Unfortunately a converted Manfrotto RC2-Plate for my BlackRapid strap occupied the tripod mounting hole. I e-mailed Jim (from Camdaptor) to see if it was possible to combine the too, he got back to me quickly and said it was not possible.

After some googling, I came upon the CustomSLR M-Plate Pro, which was a kickstarted project that had just gotten all the needed funding.
It worked with the Manfrotto RC2 and ArcticSwiss tripod mounts. It also came with a mounting hole for there own sling straps similar to the BlackRapid ones. After making sure the diameter of the screws were the same I placed my order for the M-Plate Pro with the strap loop.

I looked at the straps offered by CustomSLR but although they looked decent, they didn’t look and seem nearly as good as the Camdaptor ones. In the end I decided to order one from Camdaptor without their mounting kit and use it with the M-Plate Pro. This was partially thanks to the great review it got and the honestly and quick response of Jim. And boy, the strap was worth it!

I’ve used this combo on my trip to Norway, it worked even better than I had hoped. I kept the converter RC2 Plate in my bag as backup (A good thing too, see a bit further in this review). The original mounting screw for the BlackRapid strap fits perfectly on the M-Plate Pro. I’m confident the screw + M-Plate Pro can carry the weight of my camera + lens. The quality of the M-Plate is simply amazing. It fits snugly with my camera body.

M-Plate Pro on my Canon 7DM-Plate viewed from the side.

Both the battery and memory doors are still accessible. The part that makes contact with the camera body is also made of crock which is very nice. I also tested the plate with my monopod before leaving on my trip, it worked fine! So overall I am very happy with this combination and I enjoyed the flexibility it gives me.

Unfortunately as I found out in Norway my tripod head is on the list of unsupported Manfrotto heads, granted It was the one that came in the kit. It was a decent one but not the one I originally wanted. But it worked fine for me so I could not justify the 150 EUR+ price tag for the head I originally wanted. Although I will be replacing mine before my next trip.

I temporarily solved it by hooking one of my converted RC2 plate to the mounting points on the M-Plate Pro, this works fine but it was very bulky and made it hard to store it in this setup. I’m also not a fan of stacking mounting plates.

To summarize I highly recommend the CustomSLR M-Plate Pro, it works perfectly in combination with my BlackRapid kit and with the Campdaptor strap!

Comments Off on M-Plate Pro by CustomSLR
August 13th, 2012 | Categories: Personal

While looking for a replacement for my Lowepro SlingShot. I was unable to find something that I liked and would work for me in their selection. My local camera store recommended the Crumpler Messenger Boy 8000, after a long search[1] I finally found a place where I could order it. I found the color selection to be a bit lacking. However the brown with green one isn’t too bad.

I can fit my Canon 7D and 2 lenses in there, I can also store some miscellaneous things like lenspens, microfiber cloth, a spare battery, my cellphone and ID which is what I was after. If need be I can store my BlackRapid RS-Sport in one of the lens slots.

Above is my bag layout, it has a few components that can be positioned however you like it, I found the above to work best for my setup.

The camera on the right side; underneath it I store things like my remote, spare battery,… This way I can easily slide in the hand-strap and take out the camera when the bag is located on my left side. (I’m right handed) On the left of the camera I can store 2 lenses, I only have one in there and carry my sunglasses and some extra bits in the 2nd slot. Due to my camera having some attachments, I gave it a bit more room so it slides in and out comfortably. The result is that the pocket on the left is rather small, the separator can actually be extended a bit further but this works fine to cover up my cellphone and ID cards, it leaves a bit of space to put small things like lip balm and such.

The bag is a bit to thick for my preference, I would have prefered a thinner but longer model. It also lacks an all-weather cover like my Lowepro bags have. But it’s the only bag I found that would work for me. Overall it is a good bag, not great but good enough. I’m only hesitant to take it out in heavyish rain fall.

Comments Off on Crumpler Messenger Boy 8000
August 1st, 2012 | Categories: illumos, Personal, Technology

While on Linux you sometimes have to pick between apples and pears (Oranges being just a bit too different). Picking an Illumos distribution is more like picking dark or brown chocolate.

I’m currently using OpenIndiana and I’m overall very happy with it. However I have some issues with OI, being that KVM is more or less broken for me. (I did not experience this in OmniOS when testing.)

For now this is not enough for me to switch, I have faith it will be fixed in the near future. I tried and failed myself, but I should probably give it another go at some point.

Anyway lets cut to the chase. Overall they all provide more or less the same experience, excluding SmartOS because it is geared specifically to be a hypervisor.

If you are looking for a hypervisor, SmartOS wins hands down.
However if you are looking for a generic server distribution[1] I would recommend OpenIndiana.

Overall OpenIndiana has an active community and that is very friendly and inviting. The documentation is somewhat lacking in places. But asking on IRC will usually get your problem fixed or at least get you pointed to some documentation elsewhere.

OmniOS is very similar to OpenIndiana but lost due to the poor documentation and lack of a community.[2] However it is probably more attractive for organizations because there is commercial support available.

DilOS also requires mentioning, it looks very promising. It is a serious candidate if I ever decide to switch. But for now it’s newness is holding me at bay.

Check out this wiki page for a bit more background information where I based this article on.


  1. OpenIndiana
  2. SmartOS
  3. OmniOS
  4. DilOS
Comments Off on Which Illumos distribution do I use?
July 30th, 2012 | Categories: illumos, Technology

Here is a quick post on how to update a IPKG based zone on OpenIndiana and other Illumos based distributions.
You cannot do this from withing the zone itself but this has to be done form the global zone.

root@gravity:~# zoneadm -z zonename halt 
root@gravity:~# zoneadm -z zonename detach 
root@gravity:~# zoneadm -z zonename attach -u 

When the zone is re-attached it will be update. So the zone will be down for a few minutes.
This also made it to the wiki because I wasted a few hours trying to do this from withing the zone.

Comments Off on Updating a IPKG Zone
July 24th, 2012 | Categories: illumos, Linux, Personal, Technology

I’ve been on the lookout for a bash replacement for a while. After seeing a small discussion about ksh and the closed and open implementation in #illumos, my interest got reinvigorated.

After playing with both csh, ksh and zsh for a while, zsh clearly won.
I won’t bore you with the details of how this selection went, but I will share with you my .zshrc.

Most of you probably don’t know but I have a wiki for my personal documentation, some of it is public like the article on z shell.


There are more screenshots on the wiki article.


  • Auto-update (checked at login, max 1x per day)
  • Directory change shorthand enabled
  • Extra globbing
  • Colorization support for linux, solaris and mac os x (Or as good as I could get it)
  • Per host customizations (See example for Axion, my mac with macports)
  • Keybinds that work in xterm, putty, iterm, and sun-color
  • Auto completion
    • kill menu
    • killall menu
  • ssh host completion with auto .ssh/config setup
  • ssh user completion, stripped most comon system users to keep the list short
  • Multiple prompts (double, minimal, gentoo and gentoo-server)
    • minimal and double themes have a UTF-8 check mark/cross character (with fallback)

There is a small caveat, I use a custom font with PuTTY so check mark can still be screwed up in PuTTY.

Please see the wiki article.


Comments Off on Z shell