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
@e-minguez
e-minguez / pine64-bt.md
Created Apr 28, 2020
pine64 bluetooth
View pine64-bt.md
  • Install armbian and update it
  • Install the full firmware package and bluetooth support
apt install armbian-firmware-full bluez
systemctl enable bluetooth --now
View README-pbp-manjaro-sway.md
$ cat ~/.bash_aliases 

#alias ls="exa -alh --icons"
#alias tree="exa --tree --icons"
#alias cat="bat"
alias vi="nvim"
alias vim="nvim"
alias ls="ls --color=auto"
alias ll="ls -l --color=auto"
@e-minguez
e-minguez / README.md
Last active Mar 24, 2021
docker on lxc on turris omnia
View README.md

Turris

opkg install kmod-veth
opkg install kmod-ipt-extra
opkg install iptables-mod-extra
  • Install a new container (I created an arch linux container)
  • Open up the /srv/lxc/containername/config file for editing:
@e-minguez
e-minguez / README.md
Created Mar 23, 2021
Manjaro pinebook pro FDE howto
View README.md

Requisites

  • A manjaro x86_64 VM with X (see https://gitlab.manjaro.org/man...jaro-arm-installer/-/issues/10 4 for the reason behind the X requirement)
  • An extra disk. In my case, I've used a 8gb qcow2 empty file mapped as sata (important as the script only recognizes /dev/sd* or /dev/mmclblk* devices) so it is /dev/sda in the VM.

Process

  • ssh into the VM
  • pacman -Syyu manjaro-arm-installer
  • Reboot (just in case as it should have updated a few packages, including the kernel)
@e-minguez
e-minguez / fix_ocp_katacoda.py
Last active Jan 5, 2021
fix_ocp_katacoda.py
View fix_ocp_katacoda.py
#!/usr/bin/env python
import ruamel.yaml
import os
import socket
import fcntl
import struct
# https://stackoverflow.com/questions/24196932/how-can-i-get-the-ip-address-of-eth0-in-python/30990617
def get_ip_address(ifname):
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 pingordie.sh
#!/bin/sh
TIMES=4
HOST=$(ip route show default | awk '/default/ {print $3}')
/bin/ping -c${TIMES} ${HOST} > /dev/null
if [ $? != 0 ]
then
/sbin/shutdown -r now "No connectivity to ${HOST}, rebooting..."
fi
View acme-client.conf
authority letsencrypt {
api url "https://acme-v02.api.letsencrypt.org/directory"
account key "/etc/acme/letsencrypt-privkey.pem"
}
domain graph.openshift.tips {
domain key "/etc/ssl/private/graph.openshift.tips:443.key"
domain full chain certificate "/etc/ssl/graph.openshift.tips:443.crt"
sign with letsencrypt
}
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