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
## Netcat server command | |
nc -l <unused port # > /dev/null | |
eg: | |
nc -l 1122 > /dev/null | |
## Netcat Client command | |
dd if=/dev/zero bs=9100004096 count=1 | nc <netcat server> <netcat port> | |
eg: | |
dd if=/dev/zero bs=9100004096 count=1 | nc 10.0.1.251 1122 |
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
## Pull git submodules after cloning project from GitHub | |
## https://stackoverflow.com/questions/16773642/pull-git-submodules-after-cloning-project-from-github | |
git submodule update --init --recursive | |
## Reference : https://stackoverflow.com/questions/5828324/update-git-submodule-to-latest-commit-on-origin | |
# Get the submodule initially |
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
## Deploy Hivemall to docker | |
docker pull hivemall/latest:20180924 | |
docker run -p 8088:8088 -p 50070:50070 -p 19888:19888 -it hivemall/latest:20180924 | |
## Load Iris data into hive | |
cd $HOME && ./bin/prepare_iris.sh | |
## Launch Hive | |
hive -S | |
show databases; |
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
## install lvm2 device mapper | |
yum install -y yum-utils \ | |
device-mapper-persistent-data \ | |
lvm2 | |
## Add docker ce repos | |
yum-config-manager \ | |
--add-repo \ | |
https://download.docker.com/linux/centos/docker-ce.repo |
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
### Download and run HDP docker image | |
#!/bin/bash | |
echo "Waiting for docker daemon to start up:" | |
until docker ps 2>&1| grep STATUS>/dev/null; do sleep 1; done; >/dev/null | |
docker ps -a | grep sandbox-hdp | |
if [ $? -eq 0 ]; then | |
docker start sandbox-hdp | |
else | |
docker pull hortonworks/sandbox-hdp-standalone | |
docker run --name sandbox-hdp --hostname "sandbox-hdp.hortonworks.com" --privileged -d \ |
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
#Prune all unused docker resources | |
docker system prune | |
# Stop all docker containers | |
docker container stop $(docker container ls -aq) | |
# Remove all stopped containers | |
docker container rm $(docker container ls -aq) | |
# Docker hub login |
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
## Simple python virtual environment management | |
python3 -m venv segement_demo | |
source segement_demo/bin/activate | |
pip3 install requests | |
##### ------------ end --------- ##### | |
# Install virtualenv & virtualenv wrapper | |
pip3 install virtualenv | |
pip3 install virtualenvwrapper |
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
## Reference | |
# https://help.github.com/articles/syncing-a-fork/ | |
git remote -v | |
# Add original git remote repo | |
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git | |
git remote -v | |
# Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master. | |
git fetch upstream |
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
## Reference : https://daviseford.com/blog/2017/12/18/installing-nifi.html | |
# List all versions of java on macos | |
/usr/libexec/java_home -V | |
# Allow brew to lookup versions | |
brew tap caskroom/versions | |
# Install Java8 | |
brew cask install java8 |
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
# Quickly create lot of small files | |
# Reference : https://www.heatware.net/linux-unix/create-large-many-number-files-thousands-millions/ | |
# count = file size x no of files | |
dd if=/dev/zero of=masterfile bs=1 count=10000000 | |
#split into 10 bytes files with filename length 15 | |
split -b 10 -a 15 masterfile |