Skip to content

Instantly share code, notes, and snippets.

View merikan's full-sized avatar

Peter Merikan merikan

View GitHub Profile
@merikan
merikan / hello-htmx.html
Created October 25, 2023 17:00
htmx udemy cource
<h1>Hello from HTMX!</h1>
@merikan
merikan / docker-compose.jenkins-dind.yml
Created August 25, 2023 08:25 — forked from adelmofilho/docker-compose.jenkins-dind.yml
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
@merikan
merikan / docker-compose.jenkins-dind.yml
Created August 25, 2023 08:25 — forked from adelmofilho/docker-compose.jenkins-dind.yml
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
@merikan
merikan / print256colours.sh
Created June 23, 2022 20:03 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@merikan
merikan / convert-deploymentconfig-to-deployment.md
Created September 28, 2021 09:51 — forked from bmaupin/convert-deploymentconfig-to-deployment.md
Convert OpenShift DeploymentConfig to Kubernetes Deployment
  1. Change apiVersion from:

    - apiVersion: v1

    (or apiVersion: apps.openshift.io/v1)

    to:

@merikan
merikan / Idempotent migration in MySQL example
Created April 14, 2021 13:16 — forked from jeremyjarrell/Idempotent migration in MySQL example
In MySQL, IF statements cannot exist outside of stored procedures. Therefore, to create an idempotent migration for MySQL it's necessary to wrap the migration in a stored procedure and execute that stored procedure against the database to perform the migration.
DELIMITER $$
DROP PROCEDURE IF EXISTS add_email_address_column_to_customers_table $$
-- Create the stored procedure to perform the migration
CREATE PROCEDURE add_email_address_column_to_customers_table()
BEGIN
-- Add the email_address column to the customers table, if it doesn't already exist
@merikan
merikan / import.sh
Last active July 6, 2020 02:32
Migrate Maven artifacts from git repository to Nexus
#!/bin/bash
# Comments by Peter Merikan:
#
# This script is based on Steven Wheeler excellent script
# see https://www.steventwheeler.com/java/2018/10/30/migrate-artifactory-to-nexus.html
#
# Notes:
# 1. This script does not work on Macos, use Linux
@merikan
merikan / kubectl.md
Created March 11, 2019 09:44 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@merikan
merikan / Jenkinsfile
Created March 6, 2018 10:20 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@merikan
merikan / Jenkinsfile
Last active November 4, 2024 08:05
Some Jenkinsfile examples
Some Jenkinsfile examples