Skip to content

Instantly share code, notes, and snippets.

View zeroc0d3's full-sized avatar
👌
Building Awesome Time (Infrastructure As Code)

Dwi Fahni Denni (dfdenni) zeroc0d3

👌
Building Awesome Time (Infrastructure As Code)
View GitHub Profile
@zeroc0d3
zeroc0d3 / ecr-build.sh
Last active February 13, 2024 13:41
Build CI/CD Container Image for ECR (Elastic Container Registry)
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Build Container (Elastic Container Registry - ECR)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
export AWS_ACCOUNT_ID=$1
@zeroc0d3
zeroc0d3 / dockerhub-tag.sh
Last active February 13, 2024 13:43
Tag CI/CD Container Image for Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Tag Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"
@zeroc0d3
zeroc0d3 / dockerhub-push.sh
Last active February 13, 2024 13:43
Push CI/CD Container Image to Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Push Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"
@zeroc0d3
zeroc0d3 / dockerhub-build.sh
Last active February 13, 2024 13:45
Build CI/CD Container Image for Dockerhub Registry
#!/usr/bin/env sh
# -----------------------------------------------------------------------------
# Docker Build Container (DockerHub)
# -----------------------------------------------------------------------------
# Author : Dwi Fahni Denni
# License : Apache v2
# -----------------------------------------------------------------------------
set -e
# export CI_PROJECT_PATH="devopscorner"
@zeroc0d3
zeroc0d3 / Dockerfile-AWSCliv2-Alpine-3.16
Created December 8, 2022 23:03
Dockerfile for AWSCli v2.x (Alpine 3.16)
ARG BUILD_DATE
ARG BUILD_VERSION
ARG GIT_COMMIT
ARG GIT_URL
ARG ALPINE_VERSION=3.16
### Builder ###
FROM python:3.10.5-alpine${ALPINE_VERSION} as builder
ARG AWS_CLI_VERSION=2.9.1
@zeroc0d3
zeroc0d3 / Dockerfile-AWSCliv2-Alpine-3.15
Created December 8, 2022 23:02
Dockerfile for AWSCli v2.x (Alpine 3.15)
ARG BUILD_DATE
ARG BUILD_VERSION
ARG GIT_COMMIT
ARG GIT_URL
ARG ALPINE_VERSION=3.15
### Builder ###
FROM python:3.10.5-alpine${ALPINE_VERSION} as builder
ARG AWS_CLI_VERSION=2.9.1
@zeroc0d3
zeroc0d3 / change-permissions.sh
Last active February 13, 2024 13:52
Change default permission files (with spesific extension) & folders linux
#!/bin/sh
## Change permission folders: 0755 ##
# find /home/zeroc0d3/Documents/Repositories/DevOpsCorner -type d -exec chmod 755 {} +
## Change permission files: 0644 ##
# find /home/zeroc0d3/Documents/Repositories/DevOpsCorner -type f -exec chmod 644 {} +
## Change permission spesific files: 0755 (executable) ##
# find /home/zeroc0d3/Documents/Repositories/DevOpsCorner -name '*.sh' | xargs chmod 755
@zeroc0d3
zeroc0d3 / frontend-ws-connection.ts
Created April 17, 2022 07:54 — forked from jsdevtom/frontend-ws-connection.ts
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);
@zeroc0d3
zeroc0d3 / Dockerfile-PHPFpm-7.4-Apache
Last active December 8, 2022 23:00
Docker PHP-FPM 7.4
FROM php:7.4-apache
ARG BUILD_DATE
ARG BUILD_VERSION
ARG GIT_COMMIT
ARG GIT_URL
ENV VENDOR="DevOpsCorner.id"
ENV AUTHOR="Dwi Fahni Denni <dfdenni@devopscorner.id>"
ENV IMG_NAME="phpfpm"
@zeroc0d3
zeroc0d3 / 00_etc-hosts.md
Created September 18, 2021 10:56 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Reddit, and Imgur.

Unblock Vimeo, Reddit, Imgur, dan NPM

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows