Skip to content

Instantly share code, notes, and snippets.

View PrettySolution's full-sized avatar
☁️
in the cloud

Vasyl Herman PrettySolution

☁️
in the cloud
View GitHub Profile
@PrettySolution
PrettySolution / install-kubectl-helm-ubuntu.sh
Last active November 15, 2020 16:37 — forked from onuralp/install-kubectl-helm-ubuntu.sh
This script installs kubectl kubectx and helm to you ubuntu. I usually use docker to connect kubectl. But I created this for some reason. Enjoy
# update
sudo apt-get update
sudo apt-get -qq update
# Install kubectl
sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
sudo chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
# Install kubectx (Switch between Kubernetes contexts/namespaces)
{
"configEntities":{
"identityStore": {
"_type": "identityStoreType",
"type": "activedirectory",
"domain": "org.internal",
"nickname": "org",
"directoryServiceType": "activedirectory",
"bind": "gssapi",
"kerberosKeytab": "/etc/krb5.keytab",
@PrettySolution
PrettySolution / install and manage java versions
Last active April 22, 2022 19:37
install and manage java versions
# on Mac
https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/macos-install.html
brew install jenv
/usr/libexec/java_home -V
jenv add /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
jenv add /Users/air/Library/Java/JavaVirtualMachines/azul-1.8.0_322/Contents/Home
jenv global 11
# on Ubuntu
sudo update-alternatives --config java
@PrettySolution
PrettySolution / stress.sh
Created June 14, 2022 17:45 — forked from mikepfeiffer/stress.sh
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
sudo stress --cpu 8 --timeout 20
@PrettySolution
PrettySolution / k3d
Last active April 5, 2023 14:59
k3d
k3d cluster create --k3s-arg "--tls-san=91.207.210.233@server:*"
k3d cluster create -p "80:80@loadbalancer" -p "443:443@loadbalancer" --k3s-arg "--tls-san=kubernetes@server:*"
### steps how to create
# load freebsd 9.3 in single-user mode (2)
gmirror label -vb round-robin boot /dev/da0p1
gmirror label -vb round-robin root /dev/da0p2
gmirror label -vb round-robin swap /dev/da0p3
gmirror load
mount /dev/mirror/root /mnt
echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf
@PrettySolution
PrettySolution / oh-my-zsh
Last active October 20, 2023 08:24
oh-my-zsh
# On MAC
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install zsh
# On Ubuntu
sudo apt install zsh -y
# install ohmyzsh and zsh-syntax-highlighting & zsh-autosuggestions & powerlevel10k plugins
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
@PrettySolution
PrettySolution / install Husky zsh
Last active January 5, 2023 01:28
install Husky and commitizen in non NPM projects zsh
# how to install Husky and commitizen on non NPM projects (zsh + iTerm2)
# install Husky on each opening if folder is a git repository
echo '[ -d .git ] && npx husky install > /dev/null || true' >> ~/.zshrc
# set commitizen to intercept 'git commit -m'
mkdir -p ~/.git-templates/hooks/
echo '#!/bin/bash' > ~/.git-templates/hooks/prepare-commit-msg
echo 'exec < /dev/tty && npx cz --hook || true' >> ~/.git-templates/hooks/prepare-commit-msg
@PrettySolution
PrettySolution / loki in docker compose example
Last active August 27, 2023 06:13
loki in docker compose example
version: "3"
services:
app:
build:
dockerfile: Dockerfile
ports:
- "8080:3000"
depends_on:
- grafana
{
"type": "external_account",
"audience": "//iam.googleapis.com/projects/973163340444/locations/global/workloadIdentityPools/dev-best-security-us/providers/dev-best-security-us",
"subject_token_type": "urn:ietf:params:aws:token-type:aws4_request",
"service_account_impersonation_url": "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/pretty-solution-com-12376412364@dev-best-security-us.iam.gserviceaccount.com:generateAccessToken",
"token_url": "https://sts.googleapis.com/v1/token",
"credential_source": {
"environment_id": "aws1",
"region_url": "http://169.254.169.254/latest/meta-data/placement/availability-zone",
"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials",