Skip to content

Instantly share code, notes, and snippets.

View kudaliar032's full-sized avatar
🇮🇩

Aditya Rahman kudaliar032

🇮🇩
View GitHub Profile
@kudaliar032
kudaliar032 / inventory.yml
Created August 27, 2019 07:00
1- Windows Server 2016 Automation dengan Ansible
windows:
hosts:
192.168.56.3
vars:
ansible_user: aditya
ansible_password: inipasswordnya
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
@kudaliar032
kudaliar032 / inventory.yml
Created August 29, 2019 04:11
2- Windows Server 2016 Automation dengan Ansible
windows:
hosts:
192.168.56.3
vars:
ansible_user: aditya
ansible_password: passwordpassword
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore
@kudaliar032
kudaliar032 / playbook.yml
Created August 29, 2019 04:13
3- Windows Server 2016 Automation dengan Ansible
---
- hosts: windows
tasks:
- name: install git on windows
win_chocolatey:
name: git
state: present
git clone --depth=1 https://github.com/sstephenson/rbenv.git $RBENV_ROOT
echo 'eval "$($RBENV_ROOT/bin/rbenv init -)"' >> /etc/profile.d/rbenv.sh
echo 'eval "$($RBENV_ROOT/bin/rbenv init -)"' >> $HOME/.bashrc
chmod +x /etc/profile.d/rbenv.sh
mkdir $RBENV_ROOT/plugins
git clone --depth=1 https://github.com/sstephenson/ruby-build.git $RBENV_ROOT/plugins/ruby-build
$RBENV_ROOT/bin/rbenv install 2.4.7
$RBENV_ROOT/bin/rbenv global 2.4.7
@kudaliar032
kudaliar032 / app.py
Created December 14, 2019 06:27
app.py tefa-14-dec
import time
import redis
from flask import Flask
app = Flask(__name__)
cache = redis.Redis(host='redis', port=6379)
def get_hit_count():
retries = 5
while True:
# materi presentasi
- virtualization
- contianer
- virt vs container
- what & why docker?
https://docs.google.com/presentation/d/1pE-7hoURxkZ2DSlFc-ULLkTsU4MmcvEyZruyCOVIRxE/edit?usp=sharing
# buat akun docker hub
https://hub.docker.com/
@kudaliar032
kudaliar032 / .gitlab-ci.yml
Last active December 18, 2019 05:55
Python Heroku GitLab CI/CD Example
stages:
- test
- deploy
test_flask:
variables:
REDIS_URL: redis://redis:6379
services:
- redis
image: python:3.7-alpine
F1 F2 F3 F4 L
4.8 3.4 1.9 0.2 positive
5 3 1.6 1.2 positive
5 3.4 1.6 0.2 positive
5.2 3.5 1.5 0.2 positive
5.2 3.4 1.4 0.2 positive
4.7 3.2 1.6 0.2 positive
4.8 3.1 1.6 0.2 positive
5.4 3.4 1.5 0.4 positive
7 3.2 4.7 1.4 negative
Outlook Temp Humidity Windy Play Golf
Rainy Hot High FALSE No
Rainy Hot High TRUE No
Overcast Hot High FALSE Yes
Sunny Mild High FALSE Yes
Sunny Cool Normal FALSE Yes
Sunny Cool Normal TRUE No
Overcast Cool Normal TRUE Yes
Rainy Mild High FALSE No
Rainy Cool Normal FALSE Yes
# LAB0 | Docker Fundamental
## Installation
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce