Wednesday, July 24, 2013

Multiple Homebrew sources

Today I decided I wanted to install okular from kde mac project... At first I tried a search via brew search okular and discovered it's not in the official brew git repo... Not to worry, lists a repo that has forked the official repo. But how to get homebrew to install from that repo instead of the official... Well it's all based on git so:

git remote add kde
git fetch kde
git branch --list --remote
git checkout kde_on_brew/master
brew search okular
brew install okular

Once the install is done, to change back you can just do:
git checkout master

And thats it ;)

Monday, April 30, 2012

Open-connect replacement for CiscoAnyconnect on Ubuntu

I wanted to connect to work at home on my Ubuntu desktop so here is my simple Cisco AnyConnect recipe to get it working.

Add this PPA
add-apt-repository ppa:odyx/openconnect-helpers
Install packages
aptitude install openconnect openconnect-helpers
Grab a better network route and DNS setup script, for some reason the one provided with vpnc didn't work for me.
cd /etc/openconnect-helpers; sudo wget; sudo chmod u+x vpnc-script
 Edit the config file /etc/openconnect-helpers/default.conf. I just set the first params to:
The help package provides two convenience scripts vpn-connect and vpn-disconnect. If they don't work try your connection directly with openconnect --script /etc/openconnect-helpers/vpnc-script

Friday, April 20, 2012

Optimizing LiveWhale

Over the past few months we have been using New Relic to monitor the performance of our primary servers. The stack traces and front end performance graphs have been extremely enlightening. I have been able to see the results of even the smallest performance tweaks within minutes which has had some unfortunate consequences. The chief of which I have become slightly obsessed with how things are running down to the millisecond. The good news is, since I am the Dev/Ops guy I can call it work and get paid for it. 

Our website is built on a small PHP CMS called LiveWhale. This particular CMS has some really great features like built in content caching, CSS and JS aggregation and a developing API. There are a few drawbacks as well one of which is it relies heavily on Apache specific configs, and has a few security holes(which are quite minor.) When my boss and I first began to focused our attention on improving the performance, we focused on fixing a few php errors we where previously unaware of and applying APC. It seemed though that our efforts really havent effected the overall performance of our application because most of our latency lies within Apache's network stack the transfer bandwidth and the browsers DOM rendering. 

My overall plan to improve the performance is to reduce Apache's response time by switching to mpm-worker, adding disk caching and work with our front end developer to squeeze down our included files and possibly reduce the DOM complexity.

Because LiveWhale relies on an Apache infrastructure, I really can't switch to a higher performing server like Nginx or Cherokee, but there are a few things that can be done. One is to switch the engine from mpm-prefork to mpm-worker and add a bit more static file caching. What I recently discovered (quite by accident) is, that in order to change to mpm-worker one must also use php with fastcgi. This is because the usual libapache2-mod-php package conflicts with the mpm-worker package. Another tweak I alluded to is to add server side file caching with apaches mod-disk-cache.

So switching to fastcgi is quite a good thing because it should be another performance improvement however it probably won't effect the overall php stack much since LiveWhale is already quite efficient. To accomplish the switch I did some reading and followed this blog post for the apache config parts.

Friday, January 6, 2012

New Favorite Android App

I just installed SMS Backup +  on my Nexus S, it is really great. The app exported all my sms messages into gmail as full conversations and tagged them as SMS. It also added all my phone logs to google calendar in my new "Phone Calls" calendar. So now I have a great record of pretty much everything on my phone in my google account. As an added bonus, the app is licensed under the Apache license and is hosted on Github.