Skip to content

Instantly share code, notes, and snippets.

View hamdikh's full-sized avatar
🎯
Focusing

Hamdi KHELIL hamdikh

🎯
Focusing
View GitHub Profile
@hamdikh
hamdikh / conventional-commits.md
Created March 1, 2024 09:48 — forked from Zekfad/conventional-commits.md
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@hamdikh
hamdikh / Jenkinsfile
Created March 5, 2020 08:02 — forked from oifland/Jenkinsfile
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {

Amazon KOPS

Install kubectl and kops

brew update && brew install kubectl

brew install kops

brew install awscli

set PATH=%ConEmuBaseDir%\Scripts;%PATH%

JQ_HOME

set JQ_HOME=C:\Users%USERNAME%\Desktop\Workspace\Tools\K8s\JQ set PATH=%JQ_HOME%\bin;%PATH%

DOCKER_HOME

set DOCKER_HOME=C:\Users%USERNAME%\Desktop\Workspace\Tools\docker set PATH=%DOCKER_HOME%;%PATH%

# Install https://www.vaultproject.io/
brew install vault
# Start dev vault server in a separate terminal
vault server -dev
# ==> Vault server configuration:
# ...
# Unseal Key: 7ACQHhLZY5ivzNzhMruX9kSa+VXCah3y87hl3dPSWFk=
# Root Token: 858a6658-682e-345a-e4c4-a6e14e6f7853

Java Keytool Commands for Creating and Importing

These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. Any root or intermediate certificates will need to be imported before importing the primary certificate for your domain.

Generate a Java keystore and key pair

keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048

Vault Cheat Sheet

Start the server in DEV mode

vault server -dev

Enable a Secrets Engine

vault secrets enable -path=<name of secret> kv

An Ansible summary

Configuration file

intro_configuration.html

First one found from of

  • Contents of $ANSIBLE_CONFIG
  • ./ansible.cfg