This steps will help you to install adobe air in ubuntu 12.04. In terminal, run the following command one by one: sudo apt-add-repository “deb http://archive.canonical.com/ $(lsb_release -sc) partner” sudo apt-get update && sudo apt-get install flashplugin-installer Next, run the commands below to download Adobe Air executable. wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin Then run the commands below to change the …
Category: Ubuntu
Permanent link to this article: https://blog.openshell.in/2013/02/how-to-install-adobe-air-in-ubuntu-12-04/
Feb 05
How to install pear php in ubuntu?
Installing pear php in ubuntu machine helps you to use existing libraries to make our development easy. In terminal, run the following command: [code] sudo apt-get install php-pear [/code]
Permanent link to this article: https://blog.openshell.in/2013/02/how-to-install-pear-php-in-ubuntu/
Jan 17
Loop mysql result set multiple times or twice in php
First we will select something from the database and loop through it like so: [php] $result = mysql_query("SELECT * FROM my_table"); while($row = mysql_fetch_assoc($result)) { // inside the loop } [/php] Problem: if you want to loop through the same result set again, you will get an error because the internal pointer is currently at …
Permanent link to this article: https://blog.openshell.in/2013/01/loop-mysql-result-set-multiple-times-or-twice-in-php/
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/
Apr 15
YII Primary Key error
Error: Table “user” does not have a primary key. Solution: The crud command requires primary key to be defined in your tables. If you are working with legacy tables and can’t specify primary key, you can declare it in primaryKey() method of your model class. override method primaryKey in protected/models/User.php [php] public function primaryKey() { …
Permanent link to this article: https://blog.openshell.in/2012/04/yii-primary-key-error/