Author's posts
Jan 15
SSH Login without password
Steps to ssh login into remote server without entering password. ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys. 1) Create public and private keys using ssh-keygen thangaraj@thangaraj-Insp:~$ ssh-keygen -t dsa Generating public/private dsa …
Permanent link to this article: https://blog.openshell.in/2013/01/ssh-login-without-password/
Jan 15
Cassandra basic commands:
Create keyspace: create keyspace Keyspace1; Create column family: // This command is used to create column family and mention comparator, default_validation_class and key_validation_class to insert rows for undefined column. create column family column_family1 with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type; Update column family: update column family column_family1 with column_metadata = [ {column_name: first, validation_class: UTF8Type}, {column_name: …
Permanent link to this article: https://blog.openshell.in/2013/01/cassandra-basic-commands/
Jan 15
Export Hive data into CSV file
Use the following command used to export hive data into CSV file. set hive.io.output.fileformat = CSVTextFile; INSERT OVERWRITE LOCAL DIRECTORY ‘dir_path’ SELECT FIELD1, FIELD2, FIELD3 FROM TABLE1;
Permanent link to this article: https://blog.openshell.in/2013/01/export-hive-data-into-csv-file/
Jan 01
How to reload your bashrc file
How to reload your bashrc file Here’s a quick way to reload your bachrc file without having to invoke a new shell. [code] [root@user]# source ~/.bashrc or [root@user]# . ~/.bashrc [/code]
Permanent link to this article: https://blog.openshell.in/2013/01/how-to-reload-your-bashrc-file/
Nov 14
How to find php exec() function run without error
Use the following method to trace exec() function in PHP. Syntax: [php] exec($command, $output, $return_value); [/php] example1: [php] $command = "ls"; exec($command, $output, $return_value); // $output will contains list of files as array. // $return_value will be zero. [/php] Output: Array ( [0] => File1.txt [1] => File2.txt ) 0 example2: [php] $command = "l2"; …
Permanent link to this article: https://blog.openshell.in/2012/11/how-to-find-php-exec-function-run-without-error/
Nov 11
dpkg status database is locked by another process
This problem will arise when you accidentally kill the apt-get process or package manager not shutting down properly. So, dpkg become orphan process. To solve this problem you can either restart your computer or open up the terminal and type in the following: Code: sudo rm /var/lib/dpkg/lock Then: Code: sudo dpkg –configure -a
Permanent link to this article: https://blog.openshell.in/2012/11/dpkg-status-database-is-locked-by-another-process/
Nov 07
Access External Property File in Spring Application Context using PropertyPlaceHolderConfigurer
Target Audience: Web Component Developers, Configuration Managers and Deployment Managers What should you know already: J2EE, Spring MVC In an enterprise application we often use property files to share data in Java classes and XML configuration files. The problem is accessing these property files in your code. Whenever you want to read a value out …
Permanent link to this article: https://blog.openshell.in/2012/11/access-external-property-file-in-spring-application-context-using-propertyplaceholderconfigurer/
Oct 24
Base 64, Part 2: Padding
Well, Part 1 of this blog explained about the basics of base 64, here I would like to discuss more about base 64. Base 64 Padding I’m starting from example rather explaining in words. In Part 1 I took 3 letter word ‘man’ to explain, now I am taking a 4 letter word ‘many’. Lets …
Permanent link to this article: https://blog.openshell.in/2012/10/base-64-padding/
Oct 15
Base 64, Part 1: How and basics
Base 64 is an encoding method. It is used in many internet protocols and SMTP emails. One of the widest usage of base 64 in SMTP protocol is all binary file attachments are base 64 representation of its original data. It neither compress nor encrypt data, just encodes using the 64 alphabets shown in Table …
Permanent link to this article: https://blog.openshell.in/2012/10/how-base-64/
Sep 22
Disable foreign key checks in MySQL
Disabling foreign key checks in MySQL is usefull when you are dealing with tables that use foreign keys (InnoDB engine). You can not delete (drop) multiple tables, a parent table or a child table until you disable foreign key checks four your current database. The sql command to disable foreign key checks is: [sql]SET FOREIGN_KEY_CHECKS …
Permanent link to this article: https://blog.openshell.in/2012/09/disable-foreign-key-checks-in-mysql/