Skip to content

Instantly share code, notes, and snippets.

View sidpalas's full-sized avatar

sidpalas

View GitHub Profile
@sidpalas
sidpalas / har-test-script.js
Last active March 25, 2020 03:16
K6 test script (using Devops Directive HAR)
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
@sidpalas
sidpalas / docker-compose.yml
Created June 5, 2020 04:29
Docker compose file for setting up Jenkins + dind
version: '3'
services:
dind:
image: "docker:dind"
volumes:
- jenkins-docker-certs:/certs/client
- jenkins-data:/var/jenkins_home
networks:
jenkins:
aliases:
#!/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
Last active September 19, 2020 13:40
Docker compose with build configuration option
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
@sidpalas
sidpalas / maintenance-page.yaml
Last active November 30, 2023 13:26
Kubernetes temporary maintenance page
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 / consoleLog.js
Last active February 14, 2024 14:55
log hello
console.log("hello")