Skip to content

Instantly share code, notes, and snippets.

View stevenfrst's full-sized avatar
🎯
FeelsGoodMan

Steven Humam stevenfrst

🎯
FeelsGoodMan
View GitHub Profile
@stevenfrst
stevenfrst / self-signed-certificate-with-custom-ca.md
Created October 22, 2023 09:20 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@stevenfrst
stevenfrst / kek.py
Created October 2, 2019 17:34
Operasi Logika 2 Tabel
print(True and True) # Soal 1 no 1
print(True and False) # Soal 1 no 2
print(False and True) # Soal 1 no 3
print(False and False) # Soal 1 No 4
print(not(True and True)) # Soal 2 no 1
print(not(True and False)) # Soal 2 no 2
print(not(False and True)) # Soal 2 no 3
print(not(False and False)) # Soal 2 no 4
@stevenfrst
stevenfrst / PDP02
Created September 23, 2019 12:24
pdp02.py
# #Case 1
# nAyah = "Eko"
# nIbu = "Joni"
# print("Nama Ayah ",nAyah," Nama Ibu ",nIbu)
# #Case 2
# print("Input X and Y");x,y = [int(x) for x in input().split()]
# hasil = 2 * x + y*5
# print("Print hasil :",hasil)
# #Case 3
resource "google_compute_instance" "node1" {
name = "k8snode1"
machine_type = "n1-standard-1"
zone = "asia-southeast1-b"
boot_disk {
initialize_params {
image = "ubuntu-1804-lts"
}
}
metadata = {
provider "google" {
credentials = "${file("yourproject.json")}"
project = "vast-math-240911"
region = "asia-southeast1"
zone = "asia-southeast1-b"
}
resource "docker_image" "httpd" {
name = "httpd"
}
resource "docker_container" "httpd" {
name = "httpd-2"
image = "${docker_image.httpd.latest}"
ports {
internal = 80
resource "docker_image" "httpd" {
name = "httpd"
}
resource "docker_container" "httpd" {
name = "httpd-2"
image = "${docker_image.httpd.latest}"
ports {
internal = 80
resource "docker_image" "nginx" {
name = "nginx"
}
resource "docker_container" "nginx" {
name = "nginx-1"
image = "${docker_image.nginx.latest}"
}
provider "docker" {
host = "tcp://x.x.x.x:2376/" #x.x.x.x isi ip targer
}
@stevenfrst
stevenfrst / install.sh
Created April 28, 2019 11:30
install docker
sudo su
apt update
apt-get install apt-transport-https ca-certificates gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update -y
apt-get install docker-ce docker-ce-cli containerd.io -y