Skip to content

Instantly share code, notes, and snippets.

View Kanabanarama's full-sized avatar

Kana Lantzsch Kanabanarama

View GitHub Profile
@alfonsrv
alfonsrv / argon-eon.md
Last active April 26, 2024 22:25
Argon EON allow hard drive spin down with hd-idle – EON spin down idle disks

Argon EON's OLED display does not allow for tools like hd-idle to detect when drives are inactive due to constant temperature, RAID and usage checks, thus preventing spin down of the drives.

The responsible Python script is slowed down to a more senseful value using the decorator / extra bit of code below.

Simply insert the code from the Gist below in your /etc/argon/argonsysinfo.py and add @no_spinup above the following functions that already exist within the file:

@alfonsrv
alfonsrv / camera.py
Last active April 26, 2024 22:32
Motion detection with OpenCV + grab static snapshot every 1 second from RTSP video stream
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) Rau Systemberatung GmbH (rausys.de)
# MIT License
# credits: https://pyimagesearch.com/start-here/
import argparse
import os
from datetime import datetime, timedelta
@mcnamee
mcnamee / bitbucket-pipelines.yml
Last active December 14, 2023 03:57
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add FTP_USERNAME, FTP_PASSWORD and FTP_HOST as environment variables.
# 2. Commit this file (bitbucket-pipelines.yml) to your repo (in the repo root dir)
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initialize GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (see 'Installation' above) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:deploy-all)