Grocery Listr App

Grocery Listr is an iOS app for managing different kinds of lists with bells and whistles. What is Grocery Listr? Screenshots Server-Side What is Grocery Listr? Grocery Listr is your ONE app for lists. It is a convenient way to organize grocery lists and shopping lists. Create multiple lists, automatically group items into categories, and share your lists with friends and family. Save your favorite recipes and use them to create lists. More details about the app at http://level68.com/glist and you can get the app from iTunes Store. Highlights: Smart Lists Shared Lists Recipe Lists SMART LISTS Start typing an item name and the app will suggest relevant grocery items. Choose items and the app will automatically add correct category and units. Sort items by category or drag items to reor…

Nginx, Node, MySQL on VPS

This is a writeup to setup full node stack on a VPS instance. The min memory requirement for the VM is 256M, but ideally should be 512M or higher. I'm currently using VPS instances from www.ramnode.com. It describes how to setup a VPS (virtual private server) to run Nginx, Node.js and MySQL on CentOS 6.x. Here's a quick overview of how to secure a VPS (virtual private server) running CentOS 6.x and configure it. Secure the server Setup iptables Setup MySQL Setup Nginx Setup Node.js SECURE THE SERVER passwd root useradd myuser passwd myuser visudo Add line: myuser    ALL=(ALL)    ALL mkdir ~/.ssh cat id_rsa.pub >> ~/.ssh/authorized_keys chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys vi /etc/ssh/sshd_config PermitRootLogin no PasswordAuthentication no sudo…

Stock4Q 2.0

Stock4Q 2.0 is a rewrite to convert the original UIWebView based app to a native app. It took me much longer to get back to the rewrite; native apps were the new hip thing 2 years ago, but better late than never =). Overview: What is Stock4Q? Screenshots iOS Layouts Mobile Analytics What is Stock4Q? Stock4Q is a clean and elegant way to manage stock portfolios. The intuitive design and clean interface is meant to enrich your mobile experience with a singular aim - "real-time stock quotes at your finger tips". Stock4Q provides streaming stock quotes and portfolio tracking. Create multiple portfolios and track gains and losses in real-time. Control the frequency of stock quotes (1sec, 2sec, 5sec or more), set low/high price triggers to enable active highlighting within portfolio. More…

Node.js and JavaScript

Continuation Passing Style (CPS) Functions can take a callback and invoke upon their return value. As a programming style developer should think that a function is never allowed to return to the caller, instead it passes on control to the callback function passed as an argument to it. This provides and effective technique for non-blocking programming. In functional programming, you pass functions around as data, shuffle them around and execute them when needed. Closure JavaScript provides function level scoping instead of block level scoping Define a function inside an outer function, where inner function has access to variables defined in the outer function. Commonly used in conjunction with anonymous functions Avoid using 'this' with closure. The outer function may be a function impl…

Configure Sendmail

Configuring an email server to not get flagged as spam sender is no small feat, but these small tweaks will help your email server cross the hump. It's not a complete configuration guide for sendmail but a collection of few healthy tweaks that should put your email server in better light when viewed by Google, Microsoft, Yahoo and others. Overview: Setup STARTTLS for sendmail Setup DKIM for sendmail Add SPF record in DNS Add reverse DNS lookup Setup STARTTLS for sendmail STARTTLS is the SMTP command to "Start Transport Layer Security" i.e. to turn on SSL. It it used when authenticating senders. Install CA certs Download revoke.crl Disable TLS for local clients Configure and compile sendmail.mc Restart sendmail service # install certs on server su root cd /etc/ssl/certs wget http://www…

InfaCloud Mobile App

Informatica Cloud Mobile 2.0 is now live at iTunes Store. Informatica Cloud Mobile enables you to remotely monitor your Informatica Cloud jobs and take action on them from any place, at any time using your iPhone or iPad. Informatica Cloud Mobile works with all Informatica Cloud editions: Informatica Cloud Basic, Standard, Enterprise and Express. HIGHLIGHTS OF VERSION 2.0 Revamped user interface for iOS 7 Support for all Informatica Cloud PODs New native sidebar navigation Added ability to view audit logs for admins Added ability to create Support Requests BACKGROUND This is a complete revamp of the mobile app and mirrors the new design direction for Informatica Products. The design is also in-sync with iOS 7 updates and looks like the whole world is going flat and gray. Hey, at least the…

Casper-Slidr Theme

Casper-Slidr is a theme for Ghost.js blogging platform. It is derived from the default Casper theme that comes as part of Ghost.js installation, hence the name... THEME FEATURES Simple, clean header for pages and posts Sliding menu for all pages and posts using jquery.mmenu Support for Disqus comments in posts Syntax highlighting for code using google-code-prettify Page view tracking using Google Analytics HOW TO INSTALL THEME? Download casper-slidr.zip from GitHub Copy casper-slidr.zip to <ghost install dir>/content/themes unzip casper-slidr.zip Edit casper-slidr/default.hbs Set width/height for 'blog-logo' style, based on the your blog logo Customize the list entries under 'my-menu' to your liking Remember to create the corresponding ghost pages Set your Google Analytics Account Nu…

Casper-Slidr Theme for Ghost.js

Casper-Slidr is a theme I developed for Ghost.js for this blog. It is a derivative of the casper theme that is bundled with Ghost. It is a responsive (responsive web design) theme written primarily for mobile devices and secondly for big screen non-mobile devices. It is build upon rem (root em) units in CSS and relies on CSS media queries to perfect the fonts and images for all screen sizes. The layout is clean with minimal nesting of HTML elements and everything flows into paragraphs, after all this is meant to be a blog and should be all about content. The theme carries through with the Ghost philosophy of "content first". There were a few things missing in the casper theme which prompted me to work on casper-slidr. The biggest was the absence of navigation and menus. It may work for a…

Ghost.js on CentOS

Ghost.js is clean blogging only software with minimalistic design aesthetics and responsive web design. It comes with pretty decent functionality out of the box and its themes can be extended easily using handlebars. The bhira.net blog is running on Ghost.js and I wrote this post as a recollection of the steps I followed in setting up this server. This post describes how to setup Ghost.js blogging software on a CentOS server. These instructions are meant for a production server and will use MySQL for storage and run nodejs using pm2 (process manager for Node). Nginx is used as a proxy server for nodejs. Here are the main steps: Setup MySQL Setup Nginx Setup nodejs Setup ghost.js Setup pm2 Setup theme SETUP MYSQL Install Remi repository for CentOS 6 which depends on Fedora EPEL repository…

Nginx, PHP on VPS

This is an update to the original post for setting up Apache, PHP on CentOS. Last year has been great and there is an abundance of vendors providing VPS on the cheap. My goto website for checking the latest on VPS vendors is www.lowendbox.com. For this post I went with a tiny 128MB VPS from www.ramnode.com. This server setup is for Cent OS 6.x with Nginx + PHP-FPM + MySQL. It describes how to setup a VPS (virtual private server) to run Nginx, PHP and MySQL on CentOS. The VPS uses a tiny amount of memory (total server memory is 128MB) and is running on CentOS 6.x. The intent is to setup a fully functional server that has been secured using iptables and configured to use Nginx, PHP-FPM and MySQL for production. It uses CentOS services to manage all the applications and is configured to use l…

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. Main steps for installing SSL on Nginx: Generate CSR Purchase SSL certificate from a vendor Receive approver email Approve SSL certific…

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. Word of Caution: 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 s…

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. SETUP NAMESERVER yum list bind-* yum install bind-chroot.x86_64 (if needed) cp /usr/share/doc/bind-/sample/etc/named. /var/named/chroot/etc cp /usr/share/doc/bind-/sample/var/named/named. /var/named/chroot/var/named chown -R named:named /var/named vi /etc/resolv.conf vi /var/named/chroot/et…

Nice Fonts

Collection of nice UI fonts that I've used in apps: Raleway Source Sans Pro Roboto Lato…

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. Salesmobl Highlights: The app is FREE, try now at Apple iTunes Dual app listing on Salesforce AppExchange Single Sign-On using Salesforce OAuth 2.0 Mobile access to Salesforce Browse Salesforce Accounts, Contacts, Events, Leads Browse Salesforce standard & custom objects Customize fields for Salesforce objects Contact Sync Calendar Sync Drill-down into object details 1-tap phone call 1-tap email Log calls in Salesforce Log emails in Sal…

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 iptabl…

Git CheatSheet

CheatSheet for git commands: # clone a github repository git clone https://github.com/baldeephira/casper-slidr.git # changed files in working dir git status # show the change log git log # stage all current changes for next commit git add . # stage <file> for next commit git add -p <file> # commit previously staged files git commit -m "my msg" # stage current changes then commit (excludes new files) git commit -a # push commited changes to origin master git push # only fetch changes from remote git fetch # merge changes from origin git merge # fetch from remote and merge git pull # create a new branch 'abc' git branch abc # switch to using branch 'abc' git checkout abc # overwrite local changes and remove all local changes git fetch origin git reset --hard origin/master…

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. # connect to database mysql -u user -p -h host database # check connections and processes show variables like '%conn%'; show status like '%conn%'; show processlist; # check character-set and collation show variables like '%character%'; show variables like '%collat%'; show table status where name = 'MY_TABLE'; show full columns from 'MY_TABLE'; # database and character sets alter database MY_DATABASE character set utf8 collate utf8_unicode_ci; alter table MY_TABLE character set utf8 collate utf8_unicode_ci; create database MY_DATABASE default character set = 'utf8' default collate = 'utf8_unicode_ci'; # create new t…

Stock4Q iOS App

Stock4Q iPhone 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. Stock4Q iPhone App Highlights: The app is FREE, try now at Apple iTunes Streaming stock quotes Refresh rate of 1sec, 2sec, 5sec or more Sort portfolio by symbol, price, change, %change Track absolute and percentage gains/losses Manage multiple portfolios Active real-time green/red highlighting based on buy/sell price Access to advanced features using companion web app…

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. Stock4Q Highlights: The app is FREE, try now at www.stock4q.com Live streaming stock quotes Refresh rate of 1sec, 2sec, 5sec or more Track gains/losses, high/low highlighting for multiple portfolios Portfolio trending data over weeks, months…

Mac OS Commands

Here's a cheatsheet of some commonly used Mac OS commands. There are too many to list all of them, these just scratch the surface. #MD5 HASH: md5 -s "my string value" #BG PROCESS: your-command > dump.out 2>&1 & #SYMBOLIC LINK: ln -s /path/to/source target #CURL: curl -I http://google.com curl -L -v http://google.com > dump.out 2>&1 curl -x www-proxy.us.abc.com:80 http://google.com #ZIP and TAR: zip -r archive.zip folder1 folder2 unzip -l archive.zip tar -zcvf archive.tar.gz folder1 folder2 tar -ztvf archive.tar.gz tar -zxvf archive.tar.gz #REFACTOR: find . -type f -name "*Controller.php" -print0 xargs -0 sed -i 's/string1/string2/g' #GREP: grep -r -i --exclude='*\.svn*' "string1" . #FIND: find . -type f -name '.DS_Store' -delete rm -rf `find . -type d…

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. #Merge from mainline to branch p4 info p4 integrate -b branch_name p4 submit #Merge from branch to mainline p4 info p4 integrate -b branch_name -r p4 integrate -b branch_name -r @=12345 #Integrate from one branch to another p4 integrate //abc/main/...@2012/04/21 //abc/releases/r1/... #Backout Changelist 1000 p4 info p4 sync @999 p4 edit //depot/file1 //depot/file2 //depot/file3 p4 sync p4 resolve -ay p4 submit…

Tomcat JVM Debugging

A quick summary of tips & tricks when debugging a webapp running in Tomcat. These come in handy if you're running into memory issues and want to track down memory leaks. Run JSTAT with gc option every 300s: cd saas_prod/java/bin jps jstat -gc Bootstrappid 300s >> nodejstat.log jps and jstat executables are in java bin dir jps command displays pid named "Bootstrap" jstat command will sample java memory every 300s Run TOP in batch mode with 300s delay period: ps -ef | grep java top -b -d 300 -p javapid >> nodetop.log Find the pid for tomcat java process The -b option runs top in batch mode The -d option sets the sample delay time to every 300s The -p option uses the specified pid Opening Tomcat Debug Port at 9191: Edit catalina.sh file under tomcat/bin Edit JAVAOPT variable to add these…

CSS3 and HTML5

HTML5 support is picking up in browsers, Safari and Chrome are definitely ahead of the pack with good support for CSS3 features like gradients, border-radius, transitions. Firefox4 is not bad either, just waiting for it to graduate from beta to production. I haven't played too much with IE9, one of the problems I have with IE9 is that it overwrites my existing IE8 installation. I decided to update this website (original site written in custom PHP) to use CSS3 features and see how they work out in different browsers. I'm trying not to put any CSS hacks so this website will not render in its entirety on older browsers. Some of CSS3 features explored: CSS3 border radius CSS3 gradients CSS3 transitions Scalable Vector Graphics (SVG) CSS3 border-radius features that is supported decently well…

SfDash: Salesforce Dashboards

SfDash is an Adobe Flex 3.0 based application for creating, editing and viewing rich interactive dashboards for Salesforce.com data. It is a managed app and once deployed you can add "SfDash" tab to your personalized tabs. It supports interactive dashboards with drilldowns, intuitive wizard for dashboard item editing and highly customizable dashboard layout using drag and drop. This is version 1.0 of SfDash managed app. SfDash Quick Links: Demo Video: YouTube Video AppExchange: SfDash @ AppExchange Discussion: Google Groups…

StockQ: Adobe AIR App

Updated StockQ app to version 0.8. This version is compatible with Adobe AIR beta 3 runtime. Hopefully, this will be compatible with Adobe AIR 1.0 release as well. There is no change in feature set, only the packaging was changed to use the latest Adobe AIR SDK. You might have heard the buzz surrounding Adobe AIR which allows developers to run HTML, AJAX and Flash applications from desktop. I've been using Adobe Flex for web applications with no desktop footprint and was interested in seeing how an online technology would perform in desktop environment. It was an opportunity for me to play with thick-client apps after almost 10 years, things have definitely changed in the last decade. It was fun using Adobe Flex Builder 3, the editor still has some distance to go to match Eclipse based Jav…

JSPWiki Button Menu2 Template

Salient Features: Clean layout with improved usability Consistent placement of page actions Clear separation of page-level and application-level actions Skins can be changed on the fly All styling done through CSS Same CSS for IE and Firefox XHTML complaint html Works with JSPWiki version 2.3.x and later Tested against JSPWiki version 2.3.72-alpha Steps to Configure Skins: JSPWiki is used to denote the location of you wiki Unzip the contents of ButtonMenu2.zip to a temporary location Copy ButtonMenu2 dir to the JSPWiki/templates dir Edit JSPWiki/WEB-INF/jspwiki.properties to set templateDir to ButtonMenu2 e.g. 'jspwiki.templateDir = ButtonMenu2' To change wiki skins modify JSPWiki/templates/ButtonMenu2/ commonheader.jsp and choose one the following CSS files. Start your JSPWiki and add but…

JSPWiki Button Menu Template

Salient features: Skins can be changed on the fly All styling done through CSS Same CSS for IE and Mozilla XHTML compliant html Tables have been used sparingly Here are the steps to configure the skins: JSPWiki is used to denote the location of your wiki Unzip the contents of ButtonMenu.zip to a temporary location Copy ButtonMenu dir to the JSPWiki/templates Edit JSPWiki/WEB-INF/jspwiki.properties to set templateDir to ButtonMenu e.g. 'jspwiki.templateDir = ButtonMenu' To change wiki skins modify JSPWiki/templates/ButtonMenu/WikiCSS.jsp Start your JSPWiki and add button menus on the left-hand-side TOC by clicking the 'Edit' button and adding wiki links. The ButtonMenuTemplate skin overrides the style for unordered list (UL) tag inside the left-hand-side TOC so that all the list items appea…