Skip to content

Instantly share code, notes, and snippets.

@NorbertFenk
NorbertFenk / gist:5cace869a369dffc02a876ddd4227e7f
Last active October 11, 2024 06:48
PowerShell Customization Guide
PowerShell customization
Starship on PowerShell_
https://dev.to/ganmahmud/take-your-windows-powershell-to-the-next-level-by-starship-2gb2
Scoop pkg manager:
https://scoop.sh/
Git aliases:
https://github.com/gluons/powershell-git-aliases
@NorbertFenk
NorbertFenk / same-machine-multiple-ssh-key-for-multiple-github-account.md
Last active March 11, 2020 17:30
Using different ssh key in the same machine
// To run the Zipkin UI use the following docker command
// docker run -p 9411:9411 openzipkin/zipkin
package main
import (
"fmt"
"io"
"log"

Comparison betewen the "map as a set" and a string slice accessed by two functions. "Sort" based and "for" based search included too.

Use this command to run the benchmark tests

go test -bench=.
@NorbertFenk
NorbertFenk / go-learning.md
Created January 9, 2020 11:22
Go notes through the learning phase

Arrays

  • An array type definition specifies a length and an element type.
  • For example, the type [4]int represents an array of four integers.
  • An array's size is fixed
  • Arrays can be indexed in the usual way, so the expression s[n] accesses the nth element, starting from zero.
  • Arrays do not need to be initialized explicitly; the zero value of an array is a ready-to-use
  • An array variable denotes the entire array; it is not a pointer to the first array element (as would be the case in C).
  • When you assign or pass around an array value you will make a copy of its contents.

An array literal can be specified like so:

@NorbertFenk
NorbertFenk / install.md
Created January 8, 2020 17:40
spinnaker install guide to kind without disk persistence

Resources https://dzone.com/articles/install-spinnaker-with-halyard-on-kubernetes

https://www.spinnaker.io/setup/install/halyard/

Steps to install spinnaker to a local dev cluster You will need a Kubernetes emulator link kind You will need to install halyard. This is a spinnaker deployment management tool. Here you can find further information about it and an installation guide: https://www.spinnaker.io/setup/install/halyard/ Follow these steps : https://www.spinnaker.io/setup/install/providers/kubernetes-v2/

@NorbertFenk
NorbertFenk / VirtualboxVM-enlarge-disk.txt
Last active December 15, 2019 18:51
VirtualboxVM enlarge disk
# 1. convert vmdk to vdi
# https://unix.stackexchange.com/questions/18775/how-to-convert-vmdk-to-vdi-vhd
VBoxManage clonemedium disk <aaaa.vmdk> <aaaa.vdi> --format VDI
# 2. resize the partition, follow this answer
https://askubuntu.com/a/119458
@NorbertFenk
NorbertFenk / starship.toml
Created December 13, 2019 17:43
Starship promt config file with enabled kubernetes support. Additionally I changed the order.
prompt_order = [
"username",
"hostname",
"directory",
"git_branch",
"git_commit",
"git_state",
"git_status",
"hg_branch",
"package",
---
## Command to run the agent with root user
# docker run -it -u root --rm -v /home/norbi/robot-framework/docker-robot-framework-master:/development/code -v /home/norbi/robot-framework/robot-ansible-install:/development/ansible jenkins/jnlp-slave:3.23-1 bash
# apt-get update
# apt-get install ansible
# xvfb-run \
#--server-args="-screen 0 1920x1080x24 -ac" \
#robot \
@NorbertFenk
NorbertFenk / kubernetes-vpa.yaml
Last active July 25, 2019 08:32
Kubernetes VPA examples
# VPA
---
apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
name: my-vpa
namespace: vpa-pdb-test
spec:
targetRef:
apiVersion: "extensions/v1beta1"