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 / qemu-command-openbsd71-utm
Created Aug 1, 2022
qemu command running under the hood via UTM for an OpenBSD 7.1 arm64
View qemu-command-openbsd71-utm
qemu-system-aarch64 -L /Applications/UTM.app/Contents/Resources/qemu -S -qmp tcp:127.0.0.1:4444,server,nowait -nodefaults -vga none -spice "unix=on,addr=/Users/edu/Library/Group Containers/WDNLXAD4W8.com.utmapp.UTM/1AEA40F1-1FDC-4EF7-9D4B-D2FA79DFC7E5.spice,disable-ticketing=on,image-compression=off,playback-compression=off,streaming-video=off,gl=off" -device virtio-ramfb -cpu host -smp cpus=2,sockets=1,cores=2,threads=1 -machine virt, -accel hvf -accel tcg,tb-size=512 -drive if=pflash,format=raw,unit=0,file=/Applications/UTM.app/Contents/Resources/qemu/edk2-aarch64-code.fd,readonly=on -drive "if=pflash,unit=1,file=/Users/edu/Library/Containers/com.utmapp.UTM/Data/Documents/OpenBSD 7.1.utm/Images/efi_vars.fd" -boot menu=on -m 2048 -name "OpenBSD 7.1" -device nec-usb-xhci,id=usb-bus -device usb-tablet,bus=usb-bus.0 -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 -device qemu-xhci,id=usb-controller-0 -chardev spicevmc,name=usbredir,id=usbredirchardev0 -device usb-redir,chardev=usbredirchardev0,id=
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:
@e-minguez
e-minguez / captive_portal_login.sh
Created Jan 27, 2018
captive portal login for NetworkManager
View captive_portal_login.sh
# /etc/NetworkManager/dispatcher.d/41-captiveportal
#!/bin/bash
SSID='MYSSID'
USER='user'
PASSWORD='password'
HOST="mycaptiveportal.example.com"
URL="https://${HOST}/login.php"
if [ "${CONNECTION_ID}" == "${SSID}" ]; then
@e-minguez
e-minguez / bootstrap.sh
Last active Feb 13, 2022
Bootstrap N54L
View bootstrap.sh
yum remove postfix
yum install epel-release
yum install apcupsd smartmontools ssmtpd lm_sensors fail2ban
sensors-detect --auto
cat << EOF > /etc/fail2ban/jail.d/99-enabled.conf
[sshd]
enabled = true
EOF
@e-minguez
e-minguez / README.md
Last active Dec 29, 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 / ps4-shutdown
Created Dec 8, 2021 — forked from autumnharmony/ps4-shutdown
ps4 remote shutdown
View ps4-shutdown
dependencies:
https://www.npmjs.com/package/ps4-waker
jq
@e-minguez
e-minguez / elastic.yaml
Last active Aug 23, 2021
elastic single node k8s
View elastic.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
product: k8s-elastic
name: elastic-config
data:
elasticsearch.yaml: |
discovery.type: single-node
---
@e-minguez
e-minguez / logid.cfg
Created Aug 16, 2021
/etc/logid.cfg configuration file
View logid.cfg
devices: ({
name: "Wireless Mouse MX Master 2S";
// A lower threshold number makes the wheel switch to free-spin mode
// quicker when scrolling fast.
smartshift: { on: true; threshold: 16; };
hiresscroll: { hires: true; invert: false; target: false; };
// Higher numbers make the mouse more sensitive (cursor moves faster),
@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-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
  • Include the pine64 bluetooth config file (manually for now, see armbian/firmware#14)
  • Enable and start the bluetooth service
systemctl enable bluetooth --now