Skip to content

Instantly share code, notes, and snippets.

@maximtrp
maximtrp / Orange Pi PC and Arch Linux ARM.md
Last active September 10, 2025 22:51
Guide on how to install Arch Linux ARM on SD card for your Orange Pi PC board

Orange Pi PC & Arch Linux ARM: installation guide

This guide is based on multiple guides as well as official instructions for the other boards found on the Internet:

  1. https://github.com/RoEdAl/alarm-uboot-sunxi-armv7
  2. https://uthings.uniud.it/building-mainline-u-boot-and-linux-kernel-for-orange-pi-boards
  3. https://archlinuxarm.org/platforms/armv7/allwinner/pcduino3

I have gone through all these steps recently and got a working board with my favorite Arch Linux ARM. I hope it will be helpful for someone else.

blueprint:
name: Occupancy
description: |
This blueprint implements the 'Wasp in a Box' principle, a method for detecting room occupancy based on motion and door sensors. It was inspired by an AppDaemon app with a similar approach.
You can find more information about this blueprint on the Home Assistant Community: https://community.home-assistant.io/t/occupancy-blueprint/477772
domain: automation
source_url: https://gist.github.com/AlexanderBabel/487f054b289b61f90afdc837d23cb85e
input:
door_sensor:
name: Single Door Sensor or Door Sensor Group
@XSystem252
XSystem252 / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active September 14, 2024 19:37
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@Josua-SR
Josua-SR / debian-kmod-howto.md
Created June 17, 2020 12:24
How to build out of tree Kernel Module on Debian

How to build out of tree Kernel Module on Debian

Install Kernel Development files

First get the general build tools for compiling kernel modules: sudo apt install build-essential

Also install the kernel development headers for the currently running kernel:

debian@sr-imx8:~$ uname -a

@rordi
rordi / root-password-MariaDB-docker-compose.md
Last active May 20, 2025 14:23
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d
@strongoose
strongoose / README.md
Last active November 14, 2021 20:07
restic/systemd backups

Restic backups with systemd timers

Restic is a backup service which supports a bunch of cloud backends and incremental backup.

The files in this gist set up scheduled systemd backups using restic to Backblaze B2.

Setup

Install the files:

/etc/systemd/system/backup.service
@mrladeia
mrladeia / readme.md
Last active June 16, 2025 06:14
Iptables to Oracle Cloud port 80 and 443 open

IPTABLES to Oracle Cloud port 80 and 443 open

If you need to open up ports 80 and 443, on file /etc/iptables/rules.v4 just add

-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT

directly below

@patoi
patoi / docserver.service
Last active January 17, 2025 02:55
Using systemd for nodejs process with nvm
[Unit]
Description=Document Server Daemon
[Service]
Type=forking
Environment=NODE_VERSION=12
WorkingDirectory=/home/your_user/your_node_app_dir
ExecStart=/home/your_user/.nvm/nvm-exec npm start
StandardOutput=
User=your_user
@henrik
henrik / 1-info.md
Last active September 25, 2024 08:05
Automatically launch Cuphead (from Steam) on a Mac when a Nimbus Bluetooth game controller is connected.

The only game I play on the Mac Mini connected to our TV is Cuphead.

I wanted the game to launch automatically when I turn on one of our Nimbus game controllers, which connect via Bluetooth.

This is how:

  • Save the .scpt file below as e.g. ~/Library/Scripts/LaunchCupheadIfControllerIsConnected.scpt
    • In the .scpt, change "Nimbus" if your Bluetooth game controllers have some other name.
  • Save the .plist below as e.g. ~/Library/LaunchAgents/henrik.launch_cuphead_if_controller_is_connected.plist
  • In the .plist, change media to whatever your username is.
@andreaganduglia
andreaganduglia / keygen.sh
Created April 26, 2019 09:05
BASH - Generate a random string base64 encoded. Useful for generate keys.
#!/bin/bash
dd if=/dev/urandom bs=1024 count=1 status=none | base64
# You can adjust length simply change `bs' value.