Skip to content

Instantly share code, notes, and snippets.

# Install dependencies only when needed
FROM node:14-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
@nataz77
nataz77 / logs.sh
Last active May 17, 2023 14:08
Extract and/or combine logs from multiple k8s pods
#!/usr/bin/env bash
# shellcheck shell=bash
# Usage: ./logs.sh -l app=app or ./logs.sh -l app=app -a combinedapplog.txt or
# Author: nataz77 (https://github.com/nataz77)
function printusage {
echo 'Log extractor';
echo 'eg: ./logs.sh -l app=app ';
echo 'eg: ./logs.sh -l app=app -n app ';
echo "eg: ./logs.sh -l app=app -a log.txt"
@scyto
scyto / docker-swarm-architecture.md
Last active April 23, 2026 09:38
My Docker Swarm Architecture

This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...

Installation Step-by-Step

Each major task has its own gist, this is to help with maitainability long term.

  1. Install Debian VM for each docker host
  2. install Docker
  3. Configure Docker Swarm
  4. Install Portainer
  5. Install KeepaliveD
  6. Using VirtioFS backed by CephFS for bind mounts (migrating from glsuterFS - WIP)
@danielalvarenga
danielalvarenga / script-configure-ubuntu18.94-amd64.sh
Created July 17, 2019 23:57
Shell script to configure Ubuntu 18.04.
#!/bin/bash
# Author: Daniel Alvarenga Lima
# Ubuntu version supported: 18.04 LTS 64Bit
# EXECUTE
# sudo chmod +x script-configure-ubuntu18.94-amd64.sh
# ./script-configure-ubuntu18.94-amd64.sh
#INSTRUCTIONS
@Pen-y-Fan
Pen-y-Fan / Test Driven Development (TDD) Learning Plan.md
Last active January 12, 2026 09:07
Test Driven Development (TDD)

Learning Plan for Test Driven Development (TDD)

These learning resources primarily focus on Test Driven Development (TDD).

  • There is an emphasis on learning using PHP, Laravel and PHPUnit.
  • All these resources are free (at the time of writing)
@danielalvarenga
danielalvarenga / terminal-colors-branch.sh
Last active December 7, 2025 13:45
Show branch in terminal Ubuntu
# Add in ~/.bashrc or ~/.bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[01;31m\]"
YELLOW="\[\033[01;33m\]"
GREEN="\[\033[01;32m\]"
BLUE="\[\033[01;34m\]"
NO_COLOR="\[\033[00m\]"