Skip to content

Instantly share code, notes, and snippets.

@kubo6472
kubo6472 / beeper-hacks.css
Last active January 5, 2024 08:34
beeper theme hacks, inspired by 0xdevalias, extended
/******************************************************************/
/* Ensure 'report bug' dialog doesn't take over the entire screen */
/******************************************************************/
#mx_Dialog_Container div[aria-describedby="report_bug"] {
/* Don't take up the entire screen */
width: fit-content;
height: fit-content;
padding: 20px;
border-radius: 20px;
@kubo6472
kubo6472 / swcpins.py
Created August 25, 2024 13:24
player for sorrywecan
import RPi.GPIO as GPIO
from omxplayer import OMXPlayer
from time import sleep
from pathlib import Path
# GPIO pin number :
light = 7
# Setup the player as shown in omxplayer-wrapper examples :
path = Path('./video.mp4')
@kubo6472
kubo6472 / balena.yml
Created August 25, 2024 13:26
unifi on balena PoC
name: "Unifi"
type: "sw.application"
version: 2022.7.16
description: "Unifi Controller allows you to setup your Ubiquiti Unifi devices"
post-provisioning: >-
## Usage instructions
Once your device joins the fleet you'll need to allow some time for it to download the application and unpack it.
Then use Local IP address to connect on port 8443 and HTTPS to start the setup.
@kubo6472
kubo6472 / balena.yml
Created August 25, 2024 13:29
mediaserver on balena PoC
name: balena-mediaserver
type: sw.application
version: 2.0.6
@kubo6472
kubo6472 / smth.php
Created August 25, 2024 15:24
some PHP timeago code
$time_elapsed = timeAgo($time_ago); //The argument $time_ago is in timestamp (Y-m-d H:i:s)format.
//Function definition
function timeAgo($time_ago)
{
$time_ago = strtotime($time_ago);
$cur_time = time();
$time_elapsed = $cur_time - $time_ago;
$seconds = $time_elapsed ;
@kubo6472
kubo6472 / docker-compose.yml
Created October 28, 2024 05:11
gist of docker compose with caddy for riven
#version: "3.8" #can be omitted nowadays
networks:
caddy:
external: true
default:
volumes:
caddy_data: {}