Skip to content

Instantly share code, notes, and snippets.

@peterszatmary
peterszatmary / setup-multiple-github-pages-on-github.txt
Last active March 31, 2021 12:39
How to set up DNS to make multiple Github pages possible
1.
- delete all previous A record if you do not need them
2.
- “A Record” with host “@” and value “185.199.108.153”
- “A Record” with host “@” and value “185.199.109.153”
- “A Record” with host “@” and value “185.199.110.153”
- “A Record” with host “@” and value “185.199.111.153”
- “CNAME Record” with host “www” and value “<your_username>.github.io.”
@peterszatmary
peterszatmary / delete-git-tag-remotely
Created October 6, 2020 13:37
delete-git-tag-remotely
# Delete tag from remote git
git push --delete origin tag_name
@peterszatmary
peterszatmary / deleting-commits-in-remote-origin-git
Last active October 6, 2020 13:38
deleting-commits-in-remote-origin-git
# Deleting commits in origin remote
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
@peterszatmary
peterszatmary / count-lines-of-code
Last active August 20, 2020 09:48
count lines of code of all java files together also by file in current dir
find . -name '*.java' | xargs wc -l
@peterszatmary
peterszatmary / deleting-specific-line-from-file
Created August 17, 2020 12:49
How to delete specific line from file file.txt and store the result to the same file. Example with 4th line
sed -i.bak '4d' file.txt
@peterszatmary
peterszatmary / each-2-line-delete
Last active August 17, 2020 12:44
Delete every second line from input.file and produce new file output.file
sed -e n\;d <input.file > output.file
@peterszatmary
peterszatmary / kubernetes-helm.md
Last active January 27, 2019 12:40
Kubernetes + Helm

What Helm does

  • it is package manager

  • Create new charts from scratch

  • Package charts into chart archive (tgz) files

  • Interact with chart repositories where charts are stored

  • Install and uninstall charts into an existing Kubernetes cluster

  • Manage the release cycle of charts that have been installed with Helm

Helm client responsibilities

@peterszatmary
peterszatmary / ci-cd.md
Last active October 10, 2020 07:43
Continuous integration and delivery notes

Continuous integration and delivery notes

Notes about continuous and delivery and my thoughts.

Before CI as few Best Practises

  • for Docker use Alpine linux image (5MB)
  • for Docker use not specific cmds like apt ...
  • for Docker use .Dockerignore file to small down context
  • if needed to reuse more images in one image use Docker multi stage builds
@peterszatmary
peterszatmary / upload-artifacts-to-maven-repo.md
Last active May 27, 2020 14:37
Uploading artifacts to maven repository

Uploading artifacts to maven repository

Steps what i did to release jar file to maven repository.

What to do in few seconds

  • Make Jira Sonatype account
  • Create ticket (after that they create for you config on their side to allow you perform releases) see example
  • Make settings.xml
  • You need to cover 8 basic rules in your pom.xml.
# Run Kubernetes dashboard GUI interface on your-ip:your-favourite-port with proxy
kubectl proxy --address=<your-ip> --port=<your-favourite-port> --accept-hosts=.*
kubectl get deployments
kubectl get services
kubectl get pods
...
kubectl delete deployment <>