Skip to content

Instantly share code, notes, and snippets.

View YannMjl's full-sized avatar
💭
Learning is experience; everything else is just information!

Yann Mulonda YannMjl

💭
Learning is experience; everything else is just information!
View GitHub Profile
#!/bin/bash
terraform destroy -var "project_id=$GOOGLE_CLOUD_PROJECT" -auto-approve
#!/bin/bash
terraform apply -var "project_id=$GOOGLE_CLOUD_PROJECT" -auto-approve
// define provider configuration variables
region = "us-central1" # region in which a ccluster is created
// define Kubernetes cluster variables
cluster_name = "node-svc-k8s" # cluster name
zone = "us-central1-c" # zone in which cluster nodes is created
provider "google" {
version = "~> 3.37.0"
project = var.project_id
region = "us-central1-c"
}
FROM node:11
# Create app directory
WORKDIR /app
# Install app dependencies
COPY package*.json ./
RUN npm install
RUN npm install express
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
apiVersion: apps/v1 # implies the use of kubernetes 1.7
# use apps/v1beta2 for kubernetes 1.8
kind: Deployment
metadata:
name: node-svc-deployment
spec:
replicas: 5
selector:
matchLabels:
app: node-svc
AWSTemplateFormatVersion: 2010-09-09
# Parameters:
# InstanceType:
# Description: Server instance type
# Type: String
# Default: t2.micro
# AllowedValues:
# - t2.micro
# - t2.medium
# ConstraintDescription: Must be a valid EC2 type.
import os
import json
import boto3
import smtplib
import botocore
from datetime import datetime
from urllib.parse import urlparse
from email.message import EmailMessage
from email.mime.multipart import MIMEMultipart
#-----------------------------------------------------------------------------#
@YannMjl
YannMjl / enp0s8
Last active November 29, 2020 03:10
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
IPADDR=192.168.56.155
NETMASK=255.255.255.0
NETWORK=192.168.56.0
BROADCAST=192.168.56.255
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
#!/usr/bin/env python3
import sys
assert sys.version_info >= (3, 0)
if sys.version_info < (3, 0, 0):
print('Pyhton version', sys.version, sep=' : ')
sys.stderr.write("You need python 3 or later to run this script")
exit(1)
#----------------------------------------------------------------------#
# This script can be used to evaluate two number: #