SSL on Nginx

This post is an attempt to document end-to-end the process of getting and installing SSL certificate on nginx server. The actual installation is pretty straight forward, its the getting the certificate part which usually trips most first time users. In this post I’m specifically referring to the filenames as used by Comodo SSL Certificate, but in the past I’ve used PositiveSSL certificate which is also issued by Comodo but has a slightly different trust chain. In general, shorter trust chains are better and will result in better performance. For a cheap certificate that cost $9/year PositiveSSL has a short trust chain of depth 3, that’s hard to beat.

Read more

IPTables for CentOS

Whenever you get a new RedHat or CentOS instance you want to secure it by setting up firewall rules using the builtin in iptables. If you spinoff an Amazon EC2 instance then you’d be doing the equivalent using Security Groups, which are a slightly higher level concept but essentially performs the same function. If running a VPS on barebones CentOS, iptables is the easiest option. Its easy to lock yourself out of the system if you make a mistake when configuring iptables. I prefer writing all the rules in a script file, double checking the commands to make sure I’m not closing SSH on port 22. Also, its a good idea to remain logged in the current SSH shell after executing iptables rules and then attempt to login in a new SSH shell to ensure you still have access to the server.

Read more

Nameserver on CentOS

This post describes how to setup a nameserver on CentOS. The setup is intended to service DNS (domain name system) queries for this server itself. The nameserver is generic and can be used to provide DNS lookup for other websites as well, but the original intention of the post was to setup a fully contained server which services its own DNS queries. Since this original post I’ve started using Amazon Route53 which provides a highly available and scalable Domain Name System (DNS) web service.

Read more

Perforce Commands

Here is a list of commonly used Perforce commands when dealing with branches. They are by no means comprehensive, but are intended as a quick reminder.

Read more

Salesmobl iPhone App

Salesmobl iPhone App has been released. Salesmobl provides mobile access to Salesforce Accounts, Contacts, Events, Leads, Opportunities, and custom objects. Make one touch phone calls, send emails, log calls/emails in Salesforce and sync iPhone Contacts and Calendars with Salesforce. More details at Salesmobl site and you can view demo video on YouTube.

Read more

Apache, PHP on VPS

This post describes how to setup a VPS (virtual private server) to run Apache, PHP and MySQL on CentOS. Usually I configure only the LAMP stack on dev servers, but I had to go through some additional configuration when setting up a production web server with Apache + MySQL + PHP5 on CentOS 5.8 running on VPS. VPS servers are pretty cheap and the best way is to start with a bare bones server running CentOS 5.8 and then you can configure only the things you need. This gives you complete control on what runs on the server, but then you need to setup DNS nameserver and iptables firewall. This VPS instance uses a tiny amount of memory (total server memory is 128MB) and is running on CentOS 5.8. The intent is to setup a fully functional server that runs DNS nameserver, is secured using iptables and configured to use Apache Httpd, PHP5 and MySQL for production use. It uses CentOS services to manage all the applications and is configured to use log rotation.

Read more

Git CheatSheet

A cheatsheet of commands for git. git clone, git status, git log, git add, git commit, git push, git fetch, git merge, git pull, git branch, get checkout

Read more

MySQL CheatSheet

Here is the list of some commonly used MySQL commands. It comes in handy when creating databases and troubleshooting issues related to character set and collation.

Read more

Stock4Q iOS App

Stock4Q iOS App is available now. It’s the mobile version of Stock4Q webapp and has similar functionality for streaming stock quotes and portfolio management. The iPhone app makes REST API calls to www.stock4q.com server to login, retrieve, update portfolios and user profile using JSON. This way you can access the same portfolios on iPhone and in a web browser on any platform.

Read more

Stock4Q Web App

Stock4Q website is live now, providing streaming stock quotes and portfolio management. It provides live quotes in a browser using HTML5 and supports variable refresh rates. Stock4Q has single sign-on with Facebook, Google and Yahoo using OAuth 2.0 and allows you to import your Google portfolios into Stock4Q using Google Finance API. It tracks the gains/losses for each portfolio allowing you to set buy/sell triggers with traffic light highlighting. It has charts and stokes that visualize the trends for your portfolios over weeks, months and quarters.

Read more