Skip to content

Instantly share code, notes, and snippets.

View thomd's full-sized avatar

Thomas Dürr thomd

  • Hamburg, Germany
View GitHub Profile
@thomd
thomd / Course-Kubernetes-Commands-and-YAML.txt
Created August 1, 2021 21:33 — forked from bugcy013/Course-Kubernetes-Commands-and-YAML.txt
Course-Kubernetes-Commands-and-YAML.txt
1.a- kubectl run
kubectl get pods
kubectl run first-deployment --image=nginx
kubectl get pods
(maybe one more time to show the state changed from container creation to Running)
(copy the pod name from get pods)
kubectl exec -it pod-name -- /bin/bash
echo Hello nginx! > /usr/share/nginx/html/index.html
apt-get update
@thomd
thomd / Jenkinsfile
Last active November 18, 2022 13:01 — forked from merikan/Jenkinsfile
List of Jenkinsfile examples #list #jenkins
Some Jenkinsfile examples

Automatically Prepend a Jira Issue ID to Git Commit Messages

Use a git hook to match a Jira issue ID from the current branch, and prepend it to every commit message

Assuming the current branch contains a Jira issue ID, you can use a git hook script to prepend it to every commit message.

  1. Create an empty commit-msg git hook file, and make it executable. From your project's root directory:

     install -b -m 755 /dev/null .git/hooks/commit-msg
    
  2. Save the following script to the newly-created .git/hooks/commit-msg file:

@thomd
thomd / monit
Created February 5, 2016 11:10 — forked from gaishimo/monit
#!/bin/sh
# move this file to /etc/init.d/monit
### BEGIN INIT INFO
# Provides: monit
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: $all
# Should-Stop: $all
@thomd
thomd / markdown.css
Last active August 29, 2015 14:24 — forked from imjasonh/markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@thomd
thomd / watch.sh
Created August 13, 2014 18:34 — forked from mikesmullin/watch.sh
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@thomd
thomd / xvfb
Created February 5, 2014 12:58 — forked from jterrace/xvfb
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;
stop)