Skip to content

Instantly share code, notes, and snippets.

@ankit-rakha
ankit-rakha / install_boost
Created April 27, 2013 01:12
install boost on mac os x
$ brew install --without-python boost
@ankit-rakha
ankit-rakha / list_vertica_tables
Created May 14, 2013 00:39
list all tables in vertica database
# list all tables
verticadb=> \dt *
# list only tables with "public" schema
verticadb=> \dt public.*
@ankit-rakha
ankit-rakha / hbase shell
Last active December 17, 2015 22:29
hbase shell
1) list -- list all the tables in Hbase
2) create 'test', 'cf' -- creates a table named test and column family cf
3) scan ‘test’ -- reads the content of test table
4) put 'test', 'row1', 'cf:a', 'value2' -- add a row “row1” to table “test” with value “value2”, value 2 could be a JSON object
5) disable 'test' -- disable the table “test”
6) drop 'test' -- drop the table “test”
7) deleteall 'test', 'row1' -- delete the row “row1” from table “test”
8) scan 'table_name', { COLUMNS => 'column_family:column_qualifier', LIMIT => 10 }
9) hadoop dfs -rm filename.csv
10) hadoop dfs -copyFromLocal filename.csv /user/ankit.rakha/
@ankit-rakha
ankit-rakha / spdy_disabled_in_chrome
Created June 8, 2013 20:38
Google Chrome with SPDY disabled and set it to use System SSL
MAC OS X 10.8.3
$ cd /Applications/Google\ Chrome.app/Contents/MacOS
$ mv Google\ Chrome Chrome
Copy the following 2 lines:
#!/bin/sh
/Applications/Google\ Chrome.app/Contents/MacOS/Chrome --use-spdy=off --use-system-ssl
@ankit-rakha
ankit-rakha / Install_driver_for_ethernet_card
Created June 8, 2013 20:43
Linux* Base Driver for Intel(R) Ethernet Network Connection
1. Move the base driver tar file to the directory of your choice.
For example, use /home/username/e1000 or /usr/local/src/e1000.
2. Untar/unzip archive:
tar zxf e1000-x.x.x.tar.gz
3. Change to the driver src directory:
@ankit-rakha
ankit-rakha / pointers_to_functions
Created June 26, 2013 01:16
pointers to functions
// Define function
func1(){
...
}
// Pointer to function
void *func1_ptr = func1;
// Call to function using pointer
(*func1_ptr) ();
@ankit-rakha
ankit-rakha / install_subversion
Last active December 19, 2015 10:39
yum install
wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
// Editors
libotf, emacs, vim
// System utilities
lsof, tcpdump, strace
// File packaging utilities
zip, unzip
@ankit-rakha
ankit-rakha / CIS_Red_Hat_Enterprise_Linux_6_Benchmark_v1.2.0
Created August 20, 2013 02:36
CIS_Red_Hat_Enterprise_Linux_6_Benchmark_v1.2.0
https://benchmarks.cisecurity.org/tools2/linux/CIS_Red_Hat_Enterprise_Linux_6_Benchmark_v1.2.0.pdf
@ankit-rakha
ankit-rakha / get system serial number
Created May 9, 2014 05:33
get system serial number
dmidecode -s system-serial-number
@ankit-rakha
ankit-rakha / Sqoop 2 Server Advanced Configuration Snippet (Safety Valve) for sqoop.properties
Created July 1, 2014 09:12
add the below into Sqoop2's properties in service safety valve on upgrading to 5.0.2-1.cdh5.0.2.p0.13
org.apache.sqoop.connector.autoupgrade=true
org.apache.sqoop.framework.autoupgrade=true