Skip to content

Instantly share code, notes, and snippets.

@smijar
smijar / install-jdk-on-centos.snippets
Last active January 20, 2024 02:40
Installing JDK 7 or 8 on centos 7/8
# from https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora
# JDK 7
#------
# Change to your home directory and download the Oracle Java 7 JDK RPM with these commands:
cd ~
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm"
# Then install the RPM with this yum command (if you downloaded a different release, substitute the filename here):
sudo yum localinstall jdk-7u79-linux-x64.rpm
@smijar
smijar / install-mongodb-on-centos7.snippets
Last active September 22, 2020 05:35
Installing mongodb on centos 7
# from:https://quicktechnotes.wordpress.com/2017/01/02/how-to-install-mongodb-elasticsearch-and-graylog-on-centos-7/
# Install EPEL
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install pwgen
sudo yum -y update
# Add mongodb repo.
sudo vi /etc/yum.repos.d/mongodb-org-3.2.repo
@smijar
smijar / install-nginx-centos7.snippets
Last active May 25, 2017 18:39
Installing nginx on centos 7
# from https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-centos-7
sudo yum install epel-release
sudo yum update
sudo yum install nginx
# start nginx
sudo systemctl start nginx
# If you are running a firewall, run the following commands to allow HTTP and HTTPS traffic:
@smijar
smijar / new_gist_file_0
Created May 22, 2017 19:39
bash echo date with time
echo `date "+%Y-%m-%d-%H-%M-%S"`
# outptut - 2017-05-22-14-38-18
@smijar
smijar / using-slappasswd
Last active October 16, 2018 13:06
using slappasswd to generate SSHA password for ldap
slappasswd -h {SSHA} -s password
@smijar
smijar / python-ml-osx-packages.txt
Last active July 21, 2017 19:34
Installing python ML packages in a virtual environment on OS X
brew install numpy
brew install scipy
brew install matplotlib
---
*VirtualEnv*
$ mkvirtualenv ml
$ cd .virtualenvs/ml/
$ ln -s /usr/local/lib/python2.7/site-packages/{numpy,scipy}* lib/python2.7/site-packages/
$ workon ml
(ml) $ pip freeze | grep -i numpy
@smijar
smijar / spark-pyspark-jupyter-osx.txt
Created July 26, 2017 18:49
Install spark jupyter for pyspark
# On OS X
$ vi ~/.bash_profile
# Add following for running spark, pyspark, jupyter
#-----
# FOR SPARK
#-----
#
# for PYSPARK
@smijar
smijar / k3d-create-cluster-no-traefik.sh
Last active March 27, 2025 17:14
k3d create cluster without traefik and serverlb
# Possibly obsolete: k3d create --name testcls1 --workers 3
k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb"
# UPDATE: in newer versions onwards, this has evolved to (thanks to comments below):
k3d cluster create --k3s-arg "--no-deploy=traefik@server:*"
@smijar
smijar / k3d-lb-demo.md
Last active July 13, 2023 01:14
k3d loadbalancer demo
@smijar
smijar / k3d-ingress-nport-demo.md
Last active April 22, 2020 00:51
k3d ingress and nodeport demos