three99
application development
  • Our (soft) stack

    Every team has a favorite set of tools. Same goes for us. I will try to list them hoping that either someone will benefit, or somebody will suggest even better solutions. Read more...
  • Backing up a database on Amazon S3

    Backing up a database is necessary for every type of project. Whether you are dealing with financial transactions and need backups every 10 minutes or you are running a hobby site and you require a weekly backup, you still need to find a way to keep a copy of your database readily available. Depending on your database there may be tools and services that do the job. Here are some examples: Read more...
  • Penetration tests

    We have reached the point in the product cycle where clients are requesting that we can pass certain security standards. There was no specific request as to what these standards should be. It was a rather general guideline regarding a penetration test . For those who have never heard of this before I should say that this is not as painful as it sounds. A penetration test is a systematic scan of your system in order to highlight any weaknesses. A quick example: Lets say you have a linux box with port 22 (usually reserved for SSH) open (i.e. when someone tries to connect to it they get a response). This is potential vulnerability since it is pretty trivial to try a 'brute force attack' on the server and gain access (provided you have been lazy enough to have allowed password access). That is the kind of stuff a penetration should pick up and highlight for you. Read more...
  • Python grandfather father son snapshots - backup for EC2

    If you need to keep backups of your instance in EC2, then you can set a cron job to take a snapshot every hour and then run a python script for removing the unwanted snapshots. Read more...
  • How to install PIL on Ubuntu with JPEG support

    I was trying to get PIL to work on my ubuntu box but it failed to handle JPEGs. The system responded with the dreaded "IOError: decoder jpeg not available". Here is what I did to solve it... I am running my pylons project through a virtual environment. All the libraries are installed with pip, always run from within the virtual environment. When I tried to use PIL on my MAC I had no problems, but the same code just failed on Ubuntu (I was trying to generate some thumbnails from JPEGs). The reason was that PIP was not installed properly. It required for the installation some libraries for dealing with JPEGs which it failed to find. What you have to do is tell it where to get it from. Before doing that make sure that your system has the necessary libraries. This seems to be enough for most cases: Read more...
  • Setup headless selenium server

    We wanted to automate our selenium tests so that we could run them through our continuous integration server (hudson). The problem was that the linux box that run hudson did not have a display. Initially I did not think much of that but soon realized that although the selenium server was running on port 4444, all of my tests were failing. This was down to the fact that selenium could not start Firefox successfully. Although I am no expert on the matter, it appears that to run Firefox you need a way to display stuff (which kind of makes sense!). Since I had no display available I had to find an alternative. The solution is Xvfb. So, first install Xvfb: Read more...
  • Add your own start up scripts to your ubuntu server

    After a couple of unexpected server shutdowns we figured out that we had to automatically start certain jobs at boot time. In particular we had a server for our mercurial repository and a few paster servers that need to restart every time the machine was reboot. Writing your own start up script is very easy. In its simplest form create a file in the /var/init.d directory and make sure that you change the permissions so that it is executable (chmod +x myStartupScript). Then just run: Read more...
  • Enabling SSH with password

    In many cases you may need to access your box through ssh with a password. This may be the case if you have not installed certificates yet. You should temporarily enable access with password and when your job is done disable it. In the case of an Ubuntu machine it can be enabled for the whole system by altering /etc/ssh/sshd_config: Read more...
  • Simple Benchmarking of Nginx

    This is a quick entry about benchmarking your nginx and showing how caching makes a great performance boost. We are hosting the web page that you are reading on a micro type instance on EC2. It is pretty cheap (we have bought a reserved instance since we know that we will be running the server all year round) which works out around 10 - 15 USD per month. All our sites are Rails based and we are serving them through nginx and passenger. The experiment that I wanted to run was simple: see how many requests can the server cope with:
    1. When a page is cached
    2. When the same page is not cached
    I selected a page with text and some graphics (the benchmark seemed to have ignored the graphics part). The total size was about 1.7kB. The page was almost entirely composed by static HTML, except for a couple of links that the application had to put together (and of course the layout). I decided that benchmarking should be done via another ec2 instance based on the same availability zone (US east 1) in order to minimize network latency. For benchmarking I used ab. I am sure there are more sophisticated tools out there, but for a simple test this is fine. So I run first the test with the cached page: Read more...
  • Add a bundle to textmate (on a Mac)

    TextMate is my editor of choice. It is lightweigth and does just what I need. Not a fancy IDE that consumes half my resources and takes for ever to update. Here is a handy tip for adding bundles to it. Navigate to the path where the bundles are stored, which in the case of a Mac is : Read more...
  • Backup a volume of your Amazon Instance

    I have an amazon instance with 2 volumes. The first volume is the OS and the second volume is our database (postgres) and our files. So we decided to do daily backups of the second volume by taking a snapshot every night. I realize that there is some literature out there regarding the atomicity of the snapshot and whether you should freeze the file system while backing up etc. ect. I choose to ignore all that (or rather postpone for later) and do just plain vanilla snapshots on a daily basis. Having learned that nothing is as simple as it seems, and since there were client sites on the my instance, I decided to create a new AMI and do my experiments on that - which proved to be a wonderful idea. Creating programatically a snapshot is dead simple. You just run the following: Read more...
  • Install SSL support on nginx

    I have an ubuntu instance on AWS which is running nginx with passenger. This has been running just fine but when I tried to add SSL I figured out that the server did not support it. The solution is to recompile nginx with appropriate options (i.e. passenger and SSL). This may sound too much but it actually relatively straightforward. Here is what you have to do (perhaps create a new directory and do the downloading there): Get the lates nginx. Perhaps the version that I have here is no longer the latest. You should go at the nginx site and find out. Read more...

About

Programming web applications with Ruby on Rails, PostgreSQL (or MongoDB), mobile-first CSS and JavaScript. We host them either on EC2 or Heroku. We are pretty good with this stuff and we are doing it with passion and honesty.

Products

Although entrepreneurs at heart, we are still far from being full-time on our own products. We are trying though and there is at least one app that we are proud of. That is Vetrian, a management suite for veterinarians.

Crew

Dimitris Dovinos is a web application developer with broad background ranging from electrical and mechanical engineering, semiconductor physics (single electronics - nano-structure fabrication) to software engineering. Main interest is the development of value for money software that serves real needs and is fun to use.

Vassilis Terzopoulos is a front end engineer, passionate with writing readable code and creating responsive web application interfaces.

Contact

We are located in Chalkida, a small beautiful town in central Greece.

Farmakidou 3 Str. (map)
34100 Chalkida, Greece
Phone: 0030 222 111 2332
hello@three99.com
twitter.com/three99