Skip to content

Instantly share code, notes, and snippets.

View zeroc0d3's full-sized avatar
🎯
Building Awesome TFO (TelemetryFlow Observability)

Dwi Fahni Denni (dfdenni) zeroc0d3

🎯
Building Awesome TFO (TelemetryFlow Observability)
View GitHub Profile
@danielepolencic
danielepolencic / nsm.md
Last active April 10, 2023 17:45
Nginx Service Mesh — installation instructions

Nginx Service Mesh (NSM)

You will install the Nginx Service Mesh locally using minikube.

Launch a new cluster with:

minikube start \
  --extra-config=apiserver.service-account-signing-key-file=/var/lib/minikube/certs/sa.key \
 --extra-config=apiserver.service-account-key-file=/var/lib/minikube/certs/sa.pub \
@zeroc0d3
zeroc0d3 / mirror-repo.md
Created July 30, 2020 02:01
Mirroring Repository from GitHub to GitLab

Mirroring Repository from GitHub to GitLab

Step-by-Step

  • Open Terminal
  • Create new repository on gitlab cloud (as a target mirror)
  • Mirror clone your gitlab onpremise repository
    git clone --mirror [url_github_repo] [name_repo_mirror]
    
  • Go to cloned repository folder
@zeroc0d3
zeroc0d3 / docker-compose.yml
Last active February 13, 2024 13:53
Swarmpit for Play With Docker (PWD)
version: '3.5'
services:
app:
image: swarmpit/swarmpit:latest
environment:
- VERSION=${DOCKER_VERSION:-19.03.2}
- SWARMPIT_DB=http://db:5984
- SWARMPIT_INFLUXDB=http://influxdb:8086
- INTERACTIVE=0
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active February 8, 2025 05:24
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)
)
)
);
@juniorb2ss
juniorb2ss / bitbucket-pipeline.yml
Last active June 4, 2024 11:14
Bitbucket Pipeline Deploy Laravel to Elasticbeanstalk using parallel steps
image: atlassian/default-image:2
definitions:
services:
redis:
image: redis:3.2
memory: 512
mysql:
image: mysql:5.7
environment:
public function index(Request $request)
{
$sortBy = 'id';
$orderBy = 'desc';
$perPage = 20;
$q = null;
if ($request->has('orderBy')) $orderBy = $request->query('orderBy');
if ($request->has('sortBy')) $sortBy = $request->query('sortBy');
if ($request->has('perPage')) $perPage = $request->query('perPage');
@zeroc0d3
zeroc0d3 / docker.yml
Created January 15, 2019 07:19 — forked from rbq/docker.yaml
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites
apt: name={{item}} update_cache=yes
with_items:
- apt-transport-https
- ca-certificates
- curl
- software-properties-common
@zeroc0d3
zeroc0d3 / CSP.md
Created October 22, 2018 04:38 — forked from corburn/CSP.md
Nginx server notes

The following is from scotthelme.co.uk

Content Security Policy

with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), you can tell the browser that it can only download content from the domains you explicitly allow http://www.html5rocks.com/en/tutorials/security/content-security-policy/ https://www.owasp.org/index.php/Content_Security_Policy I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'

@zeroc0d3
zeroc0d3 / menu_launcher.py
Created August 3, 2018 04:10 — forked from abishur/menu_launcher.py
A simple menu system using python for the Terminal (Framebufer)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Topmenu and the submenus are based of the example found at this location http://blog.skeltonnetworks.com/2010/03/python-curses-custom-menu/
# The rest of the work was done by Matthew Bennett and he requests you keep these two mentions when you reuse the code :-)
# Basic code refactoring by Andrew Scheller
from time import sleep
import curses, os #curses is the interface for capturing key presses on the menu, os launches the files
screen = curses.initscr() #initializes a new window for capturing key presses
curses.noecho() # Disables automatic echoing of key presses (prevents program from input each key twice)
@zeroc0d3
zeroc0d3 / check_services.sh
Created January 23, 2018 12:36
MONITORING SERVICES SCRIPT (Simple Bash Script for View Running Services & PID Services)
#!/usr/bin/env sh
TITLE="MONITORING SERVICES SCRIPT" # script name
VER="1.0" # script version
ENV="development" # (development / production)
SKIP_LOG="0" # (0 = create log file / debug, 1 = bypass log file)
SERVICE_PRODUCTION="mysql postgresql redis mongod sidekiq pushr puma unicorn nginx"
SERVICE_DEVELOPMENT="postgresql mysql puma mongod"