Quick Post, Web Development

Android emulator crashes if proxy is specified

I have to keep note of this, since it’s quite a voodoo bug in Android studio emulator:

If you specify a http proxy in the emulator command line options, the emulator won’t work.

Weirdly enought, the only way to make it work is to specify the -no-audio option:

C:\Users\<your user folder>\AppData\Local\Android\sdk\tools>emulator -avd  <avd-name>-http-proxy -no-audio

The <avd name> is the filename of one of the ini files in C:\Users\<your user folder>\.android\avd, and of course you need to subsitute the address of your proxy server!

Snippets, Web Development

How to use iPad’s web inspector on Ubuntu 14.04

How to use iPad’s web inspector on Ubuntu

I’ve heard about remote debugging on iPad for quite a while and I used it on windows too; however it’s not so easy to have a similar system on Ubuntu. Hopefully this post will spare you an hour of time while to enable Chrome’s dev tool on your iPad.

This has been tested on xUbuntu 14.04 – but it should work as well on any Debian based OS.


1) Install dependecies:

 sudo apt-get install \
 autoconf automake \
 libusb-dev libusb-1.0-0-dev \
 libplist-dev libplist++-dev \
 usbmuxd \

Using the default instructions leads to the following message error when trying to start the proxy:

Detected an old copy of libplist?! For a fix, see: https://github.com/libimobiledevice/libimobiledevice/issues/68#issuecomment-38994545: Success Unable to start device_listener

Note: previously listed libplist-dev or libplist++-dev are useless, but I do not know which one: if you can tell which one is useless, let me know so I’ll fix the tutorial!

2) download libimobiledevice, since the ones in the Ubuntu repository are outdated; You need the 1.11 series, not the 1.10:

wget http://www.libimobiledevice.org/downloads/libplist-1.11.tar.bz2
tar -xvf libplist-1.11.tar.bz2
cd libplist-1.11/
mkdir ~/ios-proxy
./configure --prefix=/<Your home folder>/ios-proxy/
make && make install

3) Install ios webkit debug proxy using the freshly installed library:

cd ~
git clone https://github.com/google/ios-webkit-debug-proxy.git
cd ios-webkit-debug-proxy
LDFLAGS="-L/<Your home folder>/ios-proxy/lib/" CFLAGS="-I/<Your home folder>/ios-proxy/include/" ./configure --prefix=/<Your home folder>/ios-proxy make  make install

Unfortunately, you still need to call the inspector this way:

LD_PRELOAD=/<Your home folder>/ios-proxy/lib/libplist.so /<Your home folder>/ios-proxy/bin/ios_webkit_debug_proxy

4) Launch your browser (chromium works fine) and go to the page http://localhost:9222/.
Be sure your iPad is connected and not seeping and Safari is open: you should be able to see the open pages in your iPad’s Safari and connect to them!

Watch the magic as you hover your mouse on to the inspector and see the live highlight / changes on your iPad!


Development, Uncategorized, Web Development

TWIL 34th week


  • Names Active Record and BBOM. The (anti)pattern of putting persistence logic in a model is called Active record. Infact, it’s turning the project I’m working on into a BBOM
  • Fortran can be faster than C. But also, you can get the same speed in C if you know what you’re doing
  • Macaronesia is the correct spelling for Macronesia.
Snippets, Web Development

Dynamically generated content loses behaviour in Zurb Foundation

If you dynamically generate or load content in a foundation page, javascript behaviour won’t be automatically attached. Here’s the dirty way to do refresh foundation’s page behaviour:

To reflow all components:


Or, to reflow just the section component:

$(document).foundation('section', 'reflow')

via github

Web Development

Create and use your own NuGet packages

If you are an ASP.net developer and you do not know NuGet, you most certainly should.

If you already use it, chances are that you are using it just download other people’s library.

Instead, you should create your own NuGet Packages, and possibly open source them and make it available to others.


For reusability.
I think that having an easy way to include a library reduces viscosity. You will update your library and update it in all your projects

For better code.
Just the idea that somebody else will criticize, use, or even just look at your code will push you into writing better code;
Not only; writing micro libraries will force you somehow into using SOLID principles.

For Kaizen.
Not only your microlibraries will continuously improve; you’ll get more feedback from other developers, helping you develop better skills and knowledge.

Or at least, those are the expectations that prompted me to start publishing packages.