Skip to content

Instantly share code, notes, and snippets.

View bartoszmajsak's full-sized avatar
🎯
🏃🏻 ☕ ⌨️ 🔁

Bartosz Majsak bartoszmajsak

🎯
🏃🏻 ☕ ⌨️ 🔁
View GitHub Profile
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active August 20, 2024 20:28
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@bartoszmajsak
bartoszmajsak / .gitconfig
Created May 2, 2012 17:53
Synchronize with upstream
...
[alias]
synchronize-with-upstream = !~/synchronize-with-upstream.sh
...
@bartoszmajsak
bartoszmajsak / post-checkout
Created July 23, 2015 07:09
Git hook to change mvn version
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
if [ -z "$MAIN_BRANCH" ]; then
MAIN_BRANCH="develop"
@bartoszmajsak
bartoszmajsak / keybase.md
Created March 31, 2017 09:40
PGP Public Key

Keybase proof

I hereby claim:

  • I am bartoszmajsak on github.
  • I am bartoszmajsak (https://keybase.io/bartoszmajsak) on keybase.
  • I have a public key whose fingerprint is D4AF D900 4307 AE0B 568C 6E0B A33A 142A EAFE C164

To claim this, I am signing this object:

Contributing

We love contributions! Thank you so much for investing time in making our toolset better! We have gathered some hints to make the process smoother for both sides.

Coding

We have certain coding convention in place, please have a look at code-settings repository.

How to build a project

#!/usr/bin/env bash
while test $# -gt 0; do
case "$1" in
-h|--help)
echo "Options:"
echo "-r github repository name, together with user or organization, e.g. fabric8io/kubernetes-model"
echo "-t github token (https://github.com/settings/tokens)"
exit 0
;;
@bartoszmajsak
bartoszmajsak / resource.adoc
Last active June 26, 2019 15:56
Devoxx PL 2019 - Let's test on Prod! Wait! Whaaaaat?!
@bartoszmajsak
bartoszmajsak / microk8s_setup.sh
Last active July 17, 2020 09:32 — forked from caglar10ur/microk8s
microk8s setup with istio
snap install microk8s --classic
sudo ufw default allow routed
sudo iptables -P FORWARD ACCEPT
## Fedora specific fix - see https://github.com/ubuntu/microk8s/issues/408#issuecomment-581100625
sudo firewall-cmd --zone=trusted --add-masquerade --permanent
sudo firewall-cmd --zone=trusted --add-interface=cni0 --permanent
sudo firewall-cmd --reload
microk8s.enable dns dashboard metrics-server
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: "2022-07-15T11:30:12Z"
name: productpage-v1
spec:
replicas: 1
selector:
matchLabels:
app: productpage