Skip to content

Instantly share code, notes, and snippets.

Avatar
😅
I have no idea what I'm doing

Eduardo Mínguez e-minguez

😅
I have no idea what I'm doing
View GitHub Profile
View 01-podman-pod-nextcloud.md
  • Some variables to avoid writting too much and create some folders:
export PODNAME="nextcloud"
mkdir -p ~/containers/nextcloud/{db,nginx,html}
  • Copy the nginx.conf file:
View swag-podman
```
$ sudo firewall-cmd --zone=trusted --add-forward-port=port=443:proto=tcp:toport=8443 --permanent
$ sudo firewall-cmd --zone=trusted --add-forward-port=port=443:proto=tcp:toport=8443
$ sudo firewall-cmd --zone=trusted --add-forward-port=port=80:proto=tcp:toport=8080 --permanent
$ sudo firewall-cmd --zone=trusted --add-forward-port=port=80:proto=tcp:toport=8080
$ sudo firewall-cmd --zone=trusted --add-service=https --permanent
$ sudo firewall-cmd --zone=trusted --add-service=https
$ sudo firewall-cmd --zone=trusted --add-service=http --permanent
$ sudo firewall-cmd --zone=trusted --add-service=http
$ sudo firewall-cmd --zone=trusted --add-masquerade
View service.nodeport-quota.md

INDIVIDUAL PROJECT

  • Create a project and apply a services.nodeports quota = 0
$ oc new-project service-nodeport-quota
$ oc project service-nodeport-quota
$ cat << EOF | oc apply -f -
apiVersion: v1
kind: ResourceQuota
metadata:
View slimbook-one.md

Slimbook one CentOS8

Basic install with minimal selection of packages. Enable network.

Reboot and enable the connection using nmtui

dnf clean
@e-minguez
e-minguez / readme.md
Last active Aug 13, 2020
x230 FreeBSD 12.1 (Q&D howto)
View readme.md
@e-minguez
e-minguez / get-all.sh
Created May 4, 2020
Get all k8s objects, both namespaced or not
View get-all.sh
#!/usr/bin/env bash
# https://stackoverflow.com/a/55796558/491522
getall() {
for i in $(oc api-resources --verbs=list --namespaced -o name | grep -v "events.events.k8s.io" | grep -v "events" | sort | uniq); do
echo "Resource:" $i
oc -n ${1} get --ignore-not-found=true ${i} -o yaml > ${1}/${i}.yaml
done
}
@e-minguez
e-minguez / pine64_pinephone_.bashrc
Created Jul 8, 2020
pine64 and pinephone battery status in PS1
View pine64_pinephone_.bashrc
# Save this at the end of your ~/.bashrc
battery_status(){
# From http://www.basicallytech.com/blog/archive/110/Colour-coded-battery-charge-level-and-status-in-your-bash-prompt
BATTERY=/sys/class/power_supply/axp20x-battery
BATSTATE=$(cat ${BATTERY}/status)
CHARGE=$(cat ${BATTERY}/capacity)
NON='\033[00m'
@e-minguez
e-minguez / Howto.md
Last active Jun 11, 2020
object,revision from an etcd database backup
View Howto.md

Let's try etcd-dump-db to extract information from the etcd database backup.

It is not available as a package, so let's get get the source

$ sudo dnf provides etcd-dump-db
Updating Subscription Management repositories.
Last metadata expiration check: 0:38:46 ago on Thu 11 Jun 2020 08:30:30 AM UTC.
Error: No Matches found
$ go get -u -v github.com/coreos/etcd
@e-minguez
e-minguez / crypt.diff
Last active May 14, 2020
manjaro-arm-installer crypt diff
View crypt.diff
diff --git a/manjaro-arm-installer b/manjaro-arm-installer
index 43e9fe1..98f43a0 100755
--- a/manjaro-arm-installer
+++ b/manjaro-arm-installer
@@ -197,6 +197,8 @@ create_install() {
elif [[ "$EDITION" = "cubocore" ]]; then
cp $TMPDIR/root/usr/share/applications/corestuff.desktop $TMPDIR/root/etc/xdg/autostart/
fi
+
+ [ ! -z "$CRYPT" ] && tweakinitrd_crypt
You can’t perform that action at this time.