Mod Proxy equivalent in IIS using ARR and URL Rewrite Module

IIS7 is quite modular, it is shipped with lots of goodies as separate modules and together it is now one of the most powerful and flexible web server. In this post I intent to cover how we can easily configure ARR and URL Rewrite Module to get a similar functionality as of Mod Proxy in Apache. Here I will demonstrate configuration of a reverse proxy which according to the definition is
Read more →

Signing android release apk from the command line (via ant)

This post is probably out too late ,as almost all IDE’s these days (which support android development) ,probably have an Integrated release signing or debug signing utility/wizard built in, but if somebody is using an old IDE or perhaps want to integrate release in a CI(continues integration) environment , this tutorial might come in handy. Basically one has to sign an apk either with a debug key (which is generally present in your .
Read more →

Importing Exporting CSV Files in PostgreSQL Databases via COPY

This is going to be a short article which will illustrate importing and exporting a table from or to a csv file using PostgreSQL COPY command. Importing a table from CSV Assuming you already have a table in place with the right columns, the command is as follows COPY FROM ‘/path/to/csv/SourceCSVFile.csv’ DELIMITERS ‘,’ CSV; Exporting a CSV from a table. COPY TO ‘/path/to/csv/TargetCSVFile’ DELIMITERS ‘,’ CSV; Its important to mention here that generally if your data is in unicode or need strict Encoding, then Always set client_encoding before running any of the above mentioned commands.
Read more →

Serve the contents of any directory with Python’s SimpleHTTPServer

Generally, when I am in a middle of prototyping a concept or in a need of quickly executing Ajax requests or using browser features which would need the page to be hosted on a web server, I use Python’s SimpleHTTPServer module. Python’s SimpleHTTPServer is a great way of serve the contents of the current directory,all one needs to do is change directory and execute a command which will expose all contents as if they were hosted in a web page.
Read more →

Position div in the center of the page using css

When I first started web programming, creating a center aligned div was one of the most common task that I saw myself doing. since div is a block element, i.e. it takes up the full width available, and has a line break before and after it, it can easily be centered using relative styling { margin-left:auto; margin-right:auto; width:70%; background-color:#b0e0e6; } However lately I have preferred using absolute positioning technique over relative, this works for all browsers and is best for login screens or alert messages over a translucent shim.
Read more →