Skip to content

Instantly share code, notes, and snippets.

@pmoranga
pmoranga / Checking your Raspberry Pi's view of its power supply.md
Created August 16, 2023 22:44 — forked from Paraphraser/Checking your Raspberry Pi's view of its power supply.md
Checking your Raspberry Pi's view of its power supply (sometimes it's not the wall-wart)

Checking your Raspberry Pi's view of its power supply

Sometimes it seems like the first (and sometimes only) advice you get offered for almost any problem with a Raspberry Pi is "check your power supply". You think something like:

"hey, I'm using an official power supply sold as being matched with my Pi so how can there be any problem?"

You look up the specs then stick a controlled load across your supply and confirm that it can deliver the required number of Watts.

Yet your problems persist…

@pmoranga
pmoranga / 01-pre-install.sh
Created July 8, 2022 21:17 — forked from xenophonf/01-pre-install.sh
K3s on Ubuntu 20.04 with root on encrypted ZFS
#!/bin/sh
# Run as user `ubuntu` from the Ubuntu Desktop installer's live environment.
sudo apt-add-repository universe
sudo apt update
passwd ubuntu
sudo apt install --yes openssh-server screen vim
ip addr show scope global | grep inet
@pmoranga
pmoranga / .pre-commit-config.yaml
Last active February 28, 2024 11:14 — forked from skwashd/pre-commit
Git pre-commit hook that blocks commits for files that contain swear words.
## Example using https://pre-commit.com/
repos:
- repo: local
hooks:
- id: dontship
name: DONTSHIP check - Block words
entry: '\bdie\b'
language: pygrep # https://pre-commit.com/#pygrep
types: [php]
@pmoranga
pmoranga / traefik_deployment.yaml
Created May 3, 2021 21:40 — forked from guyromb/traefik_deployment.yaml
Traefik - Streaming Access Logs with JWT decoder using Filebeat
apiVersion: apps/v1
kind: Deployment
spec:
template:
metadata:
annotations:
co.elastic.logs/enabled: "true"
co.elastic.logs/processors.0.decode_json_fields.fields: message
co.elastic.logs/processors.0.decode_json_fields.target: ""
co.elastic.logs/processors.1.dissect.field: request_Authorization
@pmoranga
pmoranga / 00_readme.md
Created August 13, 2020 07:28 — forked from metacoma/00_readme.md
ArgoCD & Kapitan configuration

Using ArgoCD together with Kapitan is actually pretty easy and only requires the kapitan binary in the argo-repo-server and a ConfigManagement plugin in ArgocD (https://argoproj.github.io/argo-cd/user-guide/config-management-plugins/)

1. Edit argocd-cm configmap and add :

  configManagementPlugins: |
    - name: kapitan
      init:
        command: [sh]
        args: ["kapitan-base-compile.sh"]
@pmoranga
pmoranga / 00_readme.md
Created August 12, 2020 17:55 — forked from skinny/00_readme.md
ArgoCD & Kapitan configuration

Using ArgoCD together with Kapitan is actually pretty easy and only requires the kapitan binary in the argo-repo-server and a ConfigManagement plugin in ArgocD (https://argoproj.github.io/argo-cd/user-guide/config-management-plugins/)

1. Edit argocd-cm configmap and add :

  configManagementPlugins: |
    - name: kapitan
      init:
        command: [sh]
        args: ["kapitan-base-compile.sh"]
@pmoranga
pmoranga / k8s-pi.md
Created December 22, 2019 21:09 — forked from ljfranklin/k8s-pi.md
version: '2.1'
services:
grafana:
container_name: grafana
image: raymondmm/grafana
ports:
- 3000:3000
volumes:
- /opt/grafana:/etc/grafana:rw
- /opt/grafana:/var/lib/grafana:rw
version: '3'
services:
portainer:
container_name: portainer
image: portainer/portainer
volumes:
- /srv/docker/portainer:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"
@pmoranga
pmoranga / 00-set-authorization.groovy
Created November 27, 2017 10:38 — forked from xbeta/00-set-authorization.groovy
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)