Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Hikade thikade

  • 2innovate.at
  • Vienna
View GitHub Profile
@thikade
thikade / jenkins-decrypt.groovy
Created Oct 21, 2021 — forked from tuxfight3r/jenkins-decrypt.groovy
Decrypting Jenkins Password
View jenkins-decrypt.groovy
#To Decrypt Jenkins Password from credentials.xml
#<username>jenkins</username>
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase>
#go to the jenkins url
http://jenkins-host/script
#In the console paste the script
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J'
@thikade
thikade / convert-deploymentconfig-to-deployment.md
Last active Jun 12, 2022 — forked from tillkahlbrock/convert-deploymentconfig-to-deployment.md
Convert OpenShift DeploymentConfig to Kubernetes Deployment
View convert-deploymentconfig-to-deployment.md
  1. Change apiVersion from:

    - apiVersion: v1

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

    to:

@thikade
thikade / k8s-patch-virtualservice.go
Created May 11, 2021 — forked from dwmkerr/k8s-patch-virtualservice.go
Example showing how to patch an Istio VirtualService CRDs Golang
View k8s-patch-virtualservice.go
// Example showing how to patch Kubernetes resources.
package main
import (
"encoding/json"
"fmt"
"k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/dynamic"
@thikade
thikade / etcd-backup-cron.yaml
Created Apr 2, 2021 — forked from dmc5179/etcd-backup-cron.yaml
OpenShift Cron job to backup etcd database
View etcd-backup-cron.yaml
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: etcd-backup
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
template:
@thikade
thikade / Java_GC_Tuning.md
Last active Mar 16, 2021
Java GC tuning
View Java_GC_Tuning.md

determine JVM defaults

java -XshowSettings:vm -XX:+PrintFlagsFinal -version

Default Java 1.8.0_275: (-XX:+UseParallelGC)

$ java -XshowSettings:vm -XX:+PrintFlagsFinal  -version 2>&1 | \
  grep -E 'GCTimeRatio|HeapFreeRatio|MaxRAM|MaxHeapSize|UnlockExperimentalVMOptions|UseCGroupMemoryLimitForHeap'
 uintx DefaultMaxRAMFraction = 4 {product}
@thikade
thikade / git_crlf_conversion.md
Created Nov 1, 2020
Git replacing LF with CRLF
View git_crlf_conversion.md
@thikade
thikade / gitBash_windows.md
Created Oct 30, 2020 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make
View gitBash_windows.md

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@thikade
thikade / TLSSLed_v1.3.sh
Last active Jun 22, 2022
SSL/TLS Debugging tools & cheatsheet
View TLSSLed_v1.3.sh
#!/usr/bin/env bash
#
#### Source: http://www.taddong.com/tools/TLSSLed_v1.3.sh
#
#
# Tool:
# TLSSLed.sh
#
# Description:
# Script to extract the most relevant security details from a
@thikade
thikade / deleteOpenshiftSampleJob.groovy
Last active May 14, 2020 — forked from nextrevision/deleteJenkinsJobs.groovy
Groovy script to delete all jenkins jobs that match a regex pattern
View deleteOpenshiftSampleJob.groovy
import jenkins.model.*
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /^OpenShift sample$/
}
matchedJobs.each { job ->
println "jobs: ${job.name}"
//job.delete()
}
@thikade
thikade / .tmux.conf
Last active Oct 20, 2021
tmux config
View .tmux.conf
## Tested with tmux 1.8
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# Start numbering at 1
set -g base-index 1