Skip to content

Instantly share code, notes, and snippets.

View BluSyn's full-sized avatar

Steven Bower BluSyn

View GitHub Profile
@BluSyn
BluSyn / ghostcalc.lua
Last active November 20, 2025 05:31
nvim plugin for doing simple inline calcs (scratchpad)
-- ghostcalc.lua
-- A Neovim plugin for inline math, unit conversions, and smart line referencing.
-- Usage:
-- 10 + 10 -> = 20
-- x = 5 in -> = 5 in (Stored as 'x')
-- @x to cm -> = 12.7 cm
-- @ + 2 -> Result of previous line + 2
-- #1 + 5 -> Reference line 1
local M = {}
@BluSyn
BluSyn / link.sh
Last active November 5, 2025 01:52
updates unifi internal DNS with IPv6 addresses (needed for dual WAN failover scenario, where local IPv4 is same, but global IPv6 changes)
@BluSyn
BluSyn / PKGBUILD
Created October 31, 2025 05:21
gcc 15.2.1 for aarch64
# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
# Maintainer: Frederik Schwan <freswa at archlinux dot org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Daniel Kozak <kozzi11@gmail.com>
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: libtool requires rebuilt with each new gcc version
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
@BluSyn
BluSyn / PKGBUILD
Last active October 29, 2025 02:41
Custom hyprland 0.51 build with patches for ARM GCC 14.2
# Maintainer: FabioLolix
# Maintainer: éclairevoyant
# Maintainer: alba4k <blaskoazzolaaaron[at]gmail.com>
# Contributor: ThatOneCalculator <kainoa at t1c dot dev>
_pkgname="hyprland"
pkgname="$_pkgname-git"
pkgver=0.51.0.r123.g309c3c7
pkgrel=1
pkgdesc="Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks"
@BluSyn
BluSyn / hass_solar_automation.yaml
Created July 4, 2025 06:01
Home Assistant Automation to trigger charging Tesla with excess solar
alias: Tesla Daytime Solar Charging
description: Charge Tesla with excess solar during the day
triggers:
- minutes: /1
trigger: time_pattern
conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.tesla_wall_connector_vehicle_connected
@BluSyn
BluSyn / dvplexfix.sh
Last active December 20, 2024 13:10
Converts Dolby Vision Profile 5 encoded video files into format acceptable to Plex
#!/bin/bash
origfile="$(realpath "${1}")"
basefile="$(basename "${origfile}")"
basedir="$(dirname "${origfile}")"
ext="${basefile##*.}"
newfile="$(basename -s "${ext}" "${origfile}")nodv.${ext}"
echo "Transcoding File ${basefile} in ${basedir}..."
/**
* cache.js - es6 proxy cacher
* Copyright (c) 2019, Steven Bower (MIT License).
*/
'use strict';
/**
* Cache for Clients and Wallets
* Use with ES6 Proxy:
* eg, new Proxy(WalletClient, new Cache());
@BluSyn
BluSyn / update-secret.sh
Last active June 29, 2018 19:11
Update docker swarm secrets
#!/bin/bash
## Update specific secret by name
## (Seriously, this is annoying and should be baked in docker stack deploy)
## Call with env + secret file path, exactly as defined in docker-compose.yml
## Eg: ./update-secret.sh master ./secrets/worker/worker.json
## Dependencies: yq and jq
## yq - pip install yq
## jq - pacman -Sy jq
### Keybase proof
I hereby claim:
* I am blusyn on github.
* I am blusyn (https://keybase.io/blusyn) on keybase.
* I have a public key whose fingerprint is CED1 0C41 AA0B D389 2373 4F40 6DA2 2FB7 B442 87D9
To claim this, I am signing this object:
/**
* FOR COPAY WALLET
* Converts multisig xpubs into addresses
*
* Dependencies:
* npm install bitcore
*
* NOTE: You can retrieve xpubs from copay using JSON backup
* Decrypt json backup using sjcl @ https://github.com/bitwiseshiftleft/sjcl
*/