Skip to content

Instantly share code, notes, and snippets.

View ardyantohermawan's full-sized avatar

Ardyanto Hermawan ardyantohermawan

View GitHub Profile
@ardyantohermawan
ardyantohermawan / install-apache-mesos.sh
Created April 15, 2021 02:53 — forked from anubhavsinha/install-apache-mesos.sh
Install single node Mesos ( Latest ) cluster on Centos 7.1
sudo yum update
sudo yum install -y tar wget
# Install Mesos dependencies
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#sudo vi /etc/yum.repos.d/wandisco-svn.repo and add the following content
#[WANdiscoSVN]
#name=WANdisco SVN Repo 1.9
#enabled=1
#baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
#gpgcheck=1
@ardyantohermawan
ardyantohermawan / promtail_docker_logs.md
Created March 12, 2021 02:50 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail
@ardyantohermawan
ardyantohermawan / .vimrc
Last active October 10, 2020 07:01
Go Development using VIM
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-fugitive'
call plug#end()
syntax on
colo pablo
@ardyantohermawan
ardyantohermawan / install.sh
Created April 25, 2020 04:00
Ubuntu 18.04.04 KVM
#!/bin/bash
# install qemu and other stuffs
sudo apt-get install qemu \
qemu-system \
qemu-utils \
uml-utilities \
virt-manager \
dmg2img \
git \
@ardyantohermawan
ardyantohermawan / nginx.conf
Created November 14, 2019 04:20 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ardyantohermawan
ardyantohermawan / install-kubelet.sh
Created February 7, 2018 05:18
Install kubelet
#!/bin/bash
# Download latest kubectl version
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
# change permission to executable binary
chmod +x ./kubectl
# move to /usr/local/bin
sudo mv ./kubectl /usr/local/bin/kubectl
@ardyantohermawan
ardyantohermawan / script.sh
Created February 7, 2018 04:23
Kubernetes Master
#!/bin/bash
# Prepare for new repos
sudo apt-get -y install apt-transport-https ca-certificates software-properties-common curl
# Add docker repo
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
@ardyantohermawan
ardyantohermawan / ngrok-install.sh
Created November 7, 2017 06:30
Ngrok Service Ubuntu 16.04
#!/bin/bash
# download
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
# unzip
unzip ngrok-stable-linux-amd64.zip
# move to /usr/local/bin
sudo mv ngrok /usr/local/bin
@ardyantohermawan
ardyantohermawan / subscribe.js
Created October 29, 2017 07:31
MQTT Client using NodeJS
var mqtt = require('mqtt')
var client = mqtt.connect('mqtt://test.mosquitto.org')
client.on('connect', function () {
client.subscribe('presence')
client.publish('presence', 'Hello mqtt')
})
client.on('message', function (topic, message) {
// message is Buffer
@ardyantohermawan
ardyantohermawan / docker-image-builder.sh
Created August 24, 2017 10:11
Docker image builder
#!/bin/bash
NAMESPACE="$1"
NAME="$2"
TAG="$3"
echo "=================================="
echo "|| ||"
echo "|| Docker image builder ||"
echo "|| ||"