Benefits:
- no need to install ubuntu from the store
- choose the version you want
- choose the name you want
- choose the location you want
- install multiple versions of ubuntu
| output_address_cidr = "${join(".", [split(".", local.base_address)[0], split(".", local.base_address)[1], split(".", local.base_address)[2], split(".", split("/", local.other_address_cidr)[0])[3]])}/${split("/", local.other_address_cidr)[1]}" |
| # terraformer import azure -R edgeprime-oss -r subnet | |
| # terraform plan -out=tfplan | |
| # terraform show -json tfplan > plan.json | |
| # bash script to automatically import state to terraform | |
| #!/bin/bash | |
| # get all the ressources id and name from the state file | |
| file="imported.tfstate" | |
| # jq '.modules[].resources | .[] | {type: .type, id: .primary.id, name: .primary.attributes.name}' "$file" | |
| # put the ressources id and name, and type with jq into the variable ressources | |
| existing_ressources=$(jq '[.modules[].resources | .[] | { type: .type, name: .primary.attributes.name, id: .primary.id}]' imported.tfstate) |
| provider "azurerm" { | |
| features {} | |
| } | |
| data "azurerm_container_registry" "acr" { | |
| name = var.registry_name | |
| resource_group_name = var.resource_group_name | |
| } | |
| resource "azurerm_container_registry_task" "daily_purge_prod_images" { |
| trigger: | |
| - main | |
| parameters: | |
| - name: chartName | |
| displayName: 'Select Helm Chart' | |
| type: string | |
| default: 'chart1' | |
| values: | |
| - chart1 |
| #!/bin/bash | |
| WSL_COMMIT_REF=linux-msft-wsl-5.15.90.4 | |
| apt update && apt install -y git build-essential flex bison libssl-dev libelf-dev bc dwarves | |
| mkdir src | |
| cd src | |
| git init | |
| git remote add origin https://github.com/microsoft/WSL2-Linux-Kernel.git | |
| git config --local gc.auto 0 | |
| git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +${WSL_COMMIT_REF}:refs/remotes/origin/build/linux-msft-wsl-5.15.y |
| #!/bin/bash | |
| sudo apt update && sudo apt upgrade -y | |
| sudo apt install zsh git curl wget build-essential fzf -y | |
| export NONINTERACTIVE=1 | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| (echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> $HOME/.profile | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| brew install gcc |
| #!/bin/bash | |
| # example : refresh_ftp_users.sh -t ftp | |
| # This script is used to refresh the ftp users | |
| # it reads the users in the "ftpusers group" | |
| # and creates the users in the ftpusers file | |
| # read ftp type variable form the command line with -t or --type | |
| # if no variable is passed then set it to "ftp" | |
| # set USERS variable from the ftpusers group | |
| # if type equals ftps then FTP_USERFILE is /etc/vsftpd-ftps.userlist else /etc/vsftpd-ftp.userlist |
| # Set vi key bindings mode | |
| set -g mode-keys vi | |
| set -g status-keys vi | |
| # Set new panes to open in current directory | |
| bind c new-window -c "#{pane_current_path}" | |
| bind '"' split-window -c "#{pane_current_path}" | |
| bind % split-window -h -c "#{pane_current_path}" | |
| #!/bin/bash | |
| echo "updating system..." | |
| sudo apt update && sudo apt upgrade -yy | |
| echo "installing curl git zsh fonts-powerline tmux xclip..." | |
| sudo apt install curl git zsh fonts-powerline tmux xclip -y | |
| sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |