Skip to content

Instantly share code, notes, and snippets.

View tankibaj's full-sized avatar

Naim tankibaj

  • Berlin, Germany
  • 14:41 (UTC +02:00)
View GitHub Profile

Install it as follows from the Github:

sudo apt install build-essential extlinux wimtools syslinux libc-bin jq
curl -L https://git.io/bootiso -O
# This is the network config written by 'subiquity'
network:
bonds:
bond0:
interfaces:
- enx0050b6fdfb89
- enp2s0
ethernets:
enx0050b6fdfb89: {}
enp2s0: {}
@tankibaj
tankibaj / Sed.md
Last active September 16, 2021 15:29

Remove empty line from file

sed -i '/^\s*$/d' data.txt

OR

sed -i '/^$/d' textfile

Method 1 - Disable IPv6 using GRUB

Configure GRUB to pass kernel parameters at boot time. You’ll have to edit /etc/default/grub. Once again, make sure you have administrator privileges:

sudo nano /etc/default/grub

Now you need to modify GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX to disable IPv6 on boot:

#!/usr/bin/env bash
# Error Handling
set -o errexit; set -o pipefail; set -o nounset;
# Grab exit code
# cat /tmp/doesnotexist && rc=$? || rc=$?
# echo exitcode: $rc
# cat /dev/null && rc=$? || rc=$?
# echo exitcode: $rc
# This is the network config written by 'subiquity'
# nano /etc/netplan/*.yaml
network:
bonds:
bond0:
interfaces:
- enx0050b6fdfb89
- enp2s0
ethernets:
enx0050b6fdfb89: {}
echo -n 'username' | base64

kubectl commands

kubectl get all

kubectl get nodes

kubectl get pod

kubectl get services

kubectl create deployment nginx-depl --image=nginx

#cloud-config
# |- Set timezone
timezone: Europe/Berlin
# |- Update /etc/hosts
manage_etc_hosts: true
# |- Update hostname and fqdn
hostname: ubuntu-cloud
ethernets:
ens3:
addresses:
- 192.168.0.75/24
gateway4: 192.168.0.1
nameservers:
addresses:
- 1.1.1.1
- 8.8.8.8
version: 2