# Install pg gem
# Source http://excid3.com/blog/installing-postgresql-and-pg-gem-on-mac-osx/
PATH=$PATH:/Library/PostgreSQL/9.5/bin/ gem install pg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start python | |
PYSPARK_DRIVER_PYTHON=ipython pyspark | |
# Verify input data | |
hdfs dfs -ls input/ | |
# Read shows files | |
show_views_file = sc.textFile("input/join2_gennum?.txt") | |
# view first two lines |
# Get documents, where writters are Joel Coen and Ethan Coen.
db.movieDetails.find({ "writters" : ["Joel Coen", "Ethan Coen"] }).count()
# Get documents, where Jeff Bridges is playing leading role.
> db.movieDetails.find({ "actors.0": "Jeff Bridges" }).pretty()
sourcetype=access_* status=200 action=purchase [search
sourcetype=access_* status=200 action=purchase | top limit=3 clientip |
table clientip] | stats COUNT AS "Total Purchased", dc(productId) as "Total Products", values(productName) as "Product Names" by clientip |
rename clientip AS "VIP Customers"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source | |
# https://git-scm.com/book/en/v2/Getting-Started-Installing-Git | |
# Step 1 | |
sudo yum -y install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel | |
# Step 2 _ Enable docbook2X | |
# In order to be able to add the documentation in various formats (doc, html, info), | |
# these additional dependencies are required | |
# https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://www.digitalocean.com/community/tutorials/how-to-compile-nginx-from-source-on-a-centos-6-4-x64-vps | |
# Step 1 | |
# We have few pre-requisites to be installed to compile which include development libraries along with source code compilers. | |
yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel | |
# Step 2 | |
mkdir -p ~/src && cd ~/src | |
# Step 3 |