Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

View alknopfler's full-sized avatar
:octocat:
Coding

Alberto Morgante Medina alknopfler

:octocat:
Coding
View GitHub Profile
#!/bin/bash
## Verify number of args expected: 1
if [ $# -ne 1 ]; then
echo "Usage: $0 <network_data.json>"
exit 1
fi
NETWORK_DATA_FILE=$1
@alknopfler
alknopfler / rke2-commands.md
Created June 15, 2023 07:47 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@alknopfler
alknopfler / install-rancher-on-k3s-slemicro.md
Last active June 4, 2023 21:02
install rancher on k3s on top of sle micro
@alknopfler
alknopfler / install-k3s-on-sle-micro.md
Last active June 4, 2023 21:01
Install k3s on sle micro

install k3s on slemicro:

curl -sfL https://get.k3s.io | sh -

Para una version específica:

curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.25.9+k3s1 sh -

After running this installation:

@alknopfler
alknopfler / Install-helm-on-sle-micro.md
Last active June 4, 2023 21:02
Install Helm on SLE Micro

How to install helm en slemicro with oneliner

Due to the transactional filesystem the best way to install helm directly is:

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

@alknopfler
alknopfler / ssh-config-file-example.md
Last active June 4, 2023 21:02
SSH config file example

.ssh/config file examples

Dynamic port redirection

Host <destiny_name>
 Hostname 10.x.x.x # hostname or destiny ip
 User root
 DynamicForward 8000  # -D 8000
 IdentityFile ~/.ssh/albkey
@alknopfler
alknopfler / go-mod-redirect.md
Created June 4, 2023 20:22
go - mod redirect
@alknopfler
alknopfler / go-done-channel.go
Created June 4, 2023 20:20
Go - <-Done Channel
<-Done channel
import (
"fmt"
)
//converts a list of strings to a channel
func stringChain(done <-chan struct{}, strs ...string) <-chan string {
out := make(chan string)
go func() {
@alknopfler
alknopfler / go-parse-json-with-arbitrary-keys.go
Created June 4, 2023 20:19
Go Parse Json with arbitrary key names using interface and types assertions
// Parsing arbitrary JSON using interfaces in Go
// Demonstrates how to parse JSON with abritrary key names
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing
package main
import (
"encoding/json"
"fmt"
@alknopfler
alknopfler / Virt-manager-issue-macos.md
Last active June 4, 2023 14:30
Virt-manager issue MacOS