Skip to content

Instantly share code, notes, and snippets.

Avatar

sidpalas

View GitHub Profile
@sidpalas
sidpalas / maintenance-page.yaml
Last active January 11, 2023 00:41
Kubernetes temporary maintenance page
View maintenance-page.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: maintenance-page
data:
maintenance.html: |-
<!--HTML GOES HERE-->
<!doctype html>
<title>Site Maintenance</title>
<link rel="stylesheet" href="maintenance.css">
@sidpalas
sidpalas / docker-compose.yml
Last active September 19, 2020 13:40
Docker compose with build configuration option
View docker-compose.yml
version: "3"
services:
react-app:
# react-app code and Dockerfile within the client sub directory
build: ./client
stdin_open: true
ports:
- "3000:3000"
networks:
- mern-app
View readme-color-changer.sh
#!/bin/bash
# Array of options
colors=(000000 ffc857)
num_colors=${#colors[@]}
# Find current title color
cur_value=$(sed -n -e 's/^.*title_color=//p' readme.md | cut -c 1-6)
# Get index of current title color in colors array
@sidpalas
sidpalas / docker-compose.yml
Created June 5, 2020 04:29
Docker compose file for setting up Jenkins + dind
View docker-compose.yml
version: '3'
services:
dind:
image: "docker:dind"
volumes:
- jenkins-docker-certs:/certs/client
- jenkins-data:/var/jenkins_home
networks:
jenkins:
aliases:
@sidpalas
sidpalas / har-test-script.js
Last active March 25, 2020 03:16
K6 test script (using Devops Directive HAR)
View har-test-script.js
import { check, group, sleep } from 'k6';
import http from 'k6/http';
import { Rate } from "k6/metrics";
// A custom metric to track failure rates
var failureRate = new Rate("check_failure_rate");
// Version: 1.2
// Creator: WebInspector