Skip to content

Instantly share code, notes, and snippets.

View thikade's full-sized avatar

Thomas Hikade thikade

  • Alpium IT Solutions
  • Vienna
View GitHub Profile
@thikade
thikade / git_crlf_conversion.md
Created November 1, 2020 16:04
Git replacing LF with CRLF
@thikade
thikade / gitBash_windows.md
Created October 30, 2020 17:31 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

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 March 26, 2023 18:46
SSL/TLS Debugging tools & cheatsheet
#!/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 12:24 — forked from nextrevision/deleteJenkinsJobs.groovy
Groovy script to delete all jenkins jobs that match a regex pattern
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 October 20, 2021 06:34
tmux config
## 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
@thikade
thikade / influxdb_cli_cheat_sheet.md
Last active April 14, 2020 21:49
influxdb cheat sheat for cmdline operations

Basics

Reference

SHOW DATABASES
USE "db"

> SHOW MEASUREMENTS     # similar to tables in RDBs
name: measurements
name
----
@thikade
thikade / openshift_cli_tricks.MD
Last active April 3, 2020 13:34 — forked from tuxfight3r/openshift_cli_tricks.MD
openshift cli tricks - using go templates

openshift list all pods and their specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and their specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
@thikade
thikade / how-to-squash-commits-in-git.md
Last active March 27, 2020 15:11 — forked from patik/how-to-squash-commits-in-git.md
How to squash commits in git

Squashing Git Commits

The standard way that produces a single commit.

Use merge --squash to squash multiple commits into a single commit (without a merge commit!). Omitting -m at the final commit command will display all commit messages of bugfix branch and lets you edit the new commit message.

Switch to the master branch and make sure you are up to date:

git checkout master && git pull
@thikade
thikade / pucl_cheat_sheet.md
Last active September 7, 2020 11:22
IBM Packaging Utility CLI : pucl
@thikade
thikade / git sparse checkout.md
Created February 26, 2020 18:22
git sparse checkout procedure
git clone --no-checkout git@github.com:thikade/docker-jig.git
cd docker-jig
git config core.sparseCheckout true
echo "grafana/dashboards/*" > .git/info/sparse-checkout
git checkout thikade