Skip to main content

Posts

Blockchain explained for non techies

Blockchain, is a continuously growing list of records, called blocks, which are linked and secured using cryptography. Each block typically contains a cryptographic hash of the previous block, a timestamp and transaction data. By design, a blockchain is inherently resistant to modification of the data. It is "an open, distributed ledger (like a book having a collection of financial accounts) that can record transactions between two parties efficiently and in a verifiable and permanent way".

For use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks. Once recorded, the data in any given block cannot be altered without the alteration of all subsequent blocks, which requires "secret agreement" of the network majority.

Still confused ???
Enough of the non-sense theory and articles explaining blockchain.
Just see this 2 minute video from BBC

Automated linux shell script to setup Postfix on RHEL7 with Gmail

In my previous article on "How to setup unauthenticated mail server configuration using mail forwarding with authentication", I've tried to collate all the steps required to setup Postfix server on RHEL7. Here, I simply automate it.
Why do it manually, when you could do the same with automation for next 5 years.
-- Random Thoughts #!/bin/sh ###################################################### # This script will enable the linux postfix setup. # Ensure that mail, postfix and openssl are installed. # @author cubicrace.com ###################################################### SMTP_HOST=$1 SMTP_PORT=$2 SMTP_USERNAME=$3 SMTP_PASSWORD=$4 POSTFIX_DIR=/etc/postfix MAIN_CF=${POSTFIX_DIR}/main.cf HOSTNAME=`hostname` ERROR(){ local line=$3 [ ! -z $3 ] && line=`expr $line - 1` || line="" echo "$1, RC=$2, ERROR on line: $line" exit $2 } INFO(){ echo "$1" } addProperty(){ echo "${1} = ${2}" >> ${3} if [ $…

How to setup unauthenticated mail server configuration using mail forwarding with authentication

We want to send mails which are authenticated by a mail server, but the application can only send mails to a unauthenticated mail server. We achieve this end result of authenticated mails, by using postfix (a mail relay/forwarding tool ).

What is Postfix? Its a mail server program written by "Wietse Zweitze Venema" that started life at IBM Research as an alternative to the most popular linux "Sendmail" tool. Now he works at Google,  and continues to support Postfix.

Postfix attempts to be fast, easy to setup, and secure. After using postfix you may feel that it's just a sendmail tool, but from inside its completely different. Most Linux OS would have postfix installed by default, if not you can install it using yum or apt-get based on your OS. Before setting up postfix make sure you also have the mail tool installed. Lets try to go through the flow we want to achieve.



Configuration Steps (RedHat):
1. Install the tools
yum update && yum install postfix ma…

Good Ideas by Smarter people for a Smarter planet

Where Good Ideas come from ? ... by Steven Jhonson.
A Fantastic video filled with loads of real life examples and inspirational thoughts....


Archive

Archives are the heart and history of any blog. While the recent blog posts appear on the blog's home page, older posts are harder to find. Thanks to the archiving feature, so that the older posts can be found online at any time in the future...


How to convert a given XML snippet to an equivalent JSON format and vice-versa

In WEB based applications RESTful APIs are used to manipulate data between the browser and the server. User may enter some data which is formatted to a valid JSON object (Java Script Object Notation) before sending it to the server for processing. However at the server side this data may be stored in an XML format, which means we need to now convert this data from JSON to XML and vice-versa while sending data from server to the browser.

Below is a screenshot showing a sample XML on the left side and the generated JSON on the right side:


Conversion of JSON to XML isn't straight forward since they don't share common aspects about their structure. One may write a parser to read JSON elements one by one and then generate an XML but its a tedious job. Thanks to the power of Java Architecture for XML Binding (JAXB) which can easily parsing of XML (based on its dtd - document type definition) ie: convert an XML string into a java object and vice-versa. However pure jaxb implemetatio…

India - Nano GPS chip or NGC in currency

The RBI will soon be issuing ₹ 2000 denomination banknotes in the Mahatma Gandhi (New) Series, without the inset letter, bearing signature of Dr. Urjit R. Patel, Governor, Reserve Bank of India, and the year of printing '2016' printed on the reverse of the banknote.

The new denomination has picture of Mangalayan on the reverse, depicting the country’s first venture into the interplanetary space. The base colour of the note is magenta. The note has other designs like geometric patterns aligning with the overall colour scheme, both at the obverse and reverse.

RBI's website doesn't mention anything about the NGC chip embedded in the currency ... Seems like a rumour/fake news.

Certain rumours about the 2000 currency note:
Apparently, the new notes will have nano-GPS chips installed on them, for tracking. These chips will reportedly allow satellites to track the currency, even at 120 metres below ground level.Further, rumours say that the nano-GPS chips work without any pow…