Mercado da Ribeira

Mercado da Ribeira

We are in this awesome place every other day. It has a continual supply of some of the best produce, meat, fish and flowers in the city and is one of our favorite spots to shop. It doesn’t hurt that it is only a few minutes walk away, either. When you are in Lisbon, you should check out this market located right across from the Cais do Sodré train station. It has been under renovation for quite a while and recently re-opened with an expanded gourmet restaurant section, which is awesome! There is even a new playground for the kids with a refreshment kiosk outside underneath the Jacaranda trees. Here is a link to some more pics:...
Xojo and load balancing with Nginx

Xojo and load balancing with Nginx

The following post is the results of some tests I did running a small cluster of Xojo apps on a CentOS server and load balancing them with Nginx. I am putting the summary in this post but there is additional discussion on the Xojo forum here and here. …… OK – so the results are in. Nginx load balancing made a MAJOR difference in usability, if an app is likely at all to get temporarily locked up (processing a large file or something). In the end, this works pretty much as I hoped and allows you to run separate instances of standalone apps across different processors and still keep the connections xojo needs to maintain sessions. Nginx Conf: upstream myproject { ip_hash; server 127.0.0.1:8080; server 127.0.0.1:8081; server 127.0.0.1:8082; #add a listing for any port you are running an instance on } server { listen 80; location / { proxy_buffering off; proxy_read_timeout 5m; proxy_pass http://myproject; } } ip_hash; is required to maintain session, app fails to launch without it. proxy_buffering off; needed to keep data flowing from app to client through proxy proxy_read_timeout 5m; keeps connection open for app “pings”. If left at default the app will disconnect after 60 seconds. I tried several settings between 1-10 minutes and this was the lowest setting that worked consistently. The app remains open. In order to start the app instances, I used upstart. I am on CentOS but this should also work on RHEL and possibly Fedora and many others. This is my method of choice because it will automatically respawn instances when they fail, allows easy starting and stopping of the whole group and can exec your app...
Batch Processing Images on Mac with SIPS

Batch Processing Images on Mac with SIPS

SIPS must be one of the simplest and most underrated ways to process images on the mac. I mean, that’s what it’s there for, but it’s like no one thinks about it. I was trying to resize about 500 jpegs today with automator and then I remembered it. SIPS is simpler and faster FTW! SIPS doesn’t do EVERYTHING, but it does some common functions quickly and nicely and it’s accessible from the command line right in the terminal. Here are some things SIPS can do: #Resize a batch of images to 250px (largest side) sips -Z 250 * #Resize only .jpg files in a folder to 500px x 500px - ignores aspect sips -z 500 500 *.jpg #Rotate a batch of images 90 degrees clock-wise sips -r 90 * #Resize down to fit 250 pixels and pad with white to make them square, add finder icon sips -Z 250 -p 250 250 --padColor FFFFFF -i * There are more things you can do with SIPS – be careful, don’t hurt yourself – SIPS modifies your files without apology so experiment on copies or live a life of regret. You can see the man page for more info. Of course, you could mogrify with ImageMagick, and that is truly wonderful, but not everyone needs or has IM and SIPS works out-of-the-box on any OSX Mac. BTW, SIPS stands for Scriptable Image Processing System, in case you were...
Appcelerator and Node.js

Appcelerator and Node.js

I hadn’t build an app in Titanium lately because I had been focusing on some other projects that were Xojo based. Some time had passed and I hadn’t even opened the IDE. Then a project came a long and I needed to pull out Appcellerator again and dust it off. I opened up a project where I had left it off. There was an update to Titanium to install – did that – cracked open my project and initiated a build to the iphone simulator – and ran into the following error: /usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:181 throw e; The app wouldn’t build – the command line tools would not work – total chaos. …turns out I had updated my Node.js installation for another project I was working on and Titanium did not like it. They prefer you use something in the 0.8.x family and I was at 0.11.4 so this was definitely not going to work. Luckily, there are already two very cool utility which make managing which version of node you are using really easy: n and nvm. I personally prefer n but nvm worked better in this case because my preferred shell is tcsh but Titanium’s is bash… nvm works great in bash, and for Titanium. Solution So – in a nutshell – the solution is install nvm, install Node.js v0.8.25 using nvm, make it the default node version and THEN run Titanium. Voila – back to normal! Something like this under bash: #get nvm curl https://raw.github.com/creationix/nvm/master/install.sh | sh #get an older node version nvm install 0.8.25 #use the new old version and set it as default nvm use 0.8.25...
Casa de Xisto

Casa de Xisto

There is something about the scent of the earth, the trees, the leafy things, reaching through the unspoiled mountain air and the song of that small river free running in the distance. There is a gentle mist falling, settling into my bones, and these stones. The place is at once alive, yet centuries old – not at all dead and buried but breathing softly, warmly. Oleiros whispers with the quiet, ancient, humble heart of a grandfather. Unusually silent, my young son stands beside me. I take his...
Timeline JS

Timeline JS

I was asked by a client recently to explore online timeline solutions for a website project. I found many, most of them decent. This one I thought stood out from the crowd though. I really like the ease of setup and ease of embedding links to external media of different types (YouTube, Wikipedia, etc). I also like that it is an open-source project. I haven’t used it yet, but if this project goes forward I will followup here – this is the direction I will recommend.   Check it out here:...