Autonomous Data Bots

Today we are at a place where its practical to deploy autonomous data bots on edge computing to collect data and make intelligent decisions. We have been incrementally moving towards this goal over the past decade. This post delves into the various stages in evolution towards autonomous data bots. Remote Agents, HTTP Tunneling & Long Polling Self-Upgrading Programs WebSockets, SSE, and HTTP/2 Server Push Self-Sustaining Bots The data bots are autonomous, manage their own lifecycle while running on edge networks, and communicate with central cloud servers for data and knowledge exchange.

AWS Glacier Backups

A short list of commands to help zip or image data and content into mid-size chunks that can be stored in S3 buckets. Since we are storing backups on AWS S3 Glacier, which needs to be restores before access, we want to keep the number of files reasonable. AWS charges for each API request, so incentive to store bigger files. The max limit on single file is 4GB. So lets go with file size in the range of 100MB - 3GB.

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.

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.

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”.

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.

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

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

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.

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.

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.

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.

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.

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

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.

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.

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 table create table if not exists MY_TABLE ( ID bigint not null auto_increment, NAME varchar(100) not null, ORG_ID bigint not null, COMMENT longtext, CREATED_ON datetime, primary key (ID), unique (NAME, ORG_ID) ) engine = MyISAM|InnoDB , default character set = 'utf8' default collate = 'utf8_general_ci'; # create new user create user 'dummy'@'localhost' identified by 'dummy'; grant all privileges on MY_DATABASE.

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. 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.

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.

Nice Fonts

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

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:

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.

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

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.

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.

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.