Skip to content

Instantly share code, notes, and snippets.

View benjivesterby's full-sized avatar
🧬
Always Building

Benji Vesterby benjivesterby

🧬
Always Building
View GitHub Profile
@benjivesterby
benjivesterby / _gh-cli-copilot-api.md
Created April 13, 2025 17:43 — forked from 0xdevalias/_gh-cli-copilot-api.md
Some notes and references while exploring the GitHub CLI extension for the GitHub Copilot CLI
@benjivesterby
benjivesterby / base64.nix
Created March 14, 2025 20:37 — forked from manveru/base64.nix
Encode to base 64 in pure Nix
{lib, ...}: {
toBase64 = text: let
inherit (lib) sublist mod stringToCharacters concatMapStrings;
inherit (lib.strings) charToInt;
inherit (builtins) substring foldl' genList elemAt length concatStringsSep stringLength;
lookup = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
sliceN = size: list: n: sublist (n * size) size list;
pows = [(64 * 64 * 64) (64 * 64) 64 1];
intSextets = i: map (j: mod (i / j) 64) pows;
compose = f: g: x: f (g x);
@benjivesterby
benjivesterby / default.nix
Created December 23, 2024 20:51 — forked from andir/default.nix
nixos build virtualbox image for dummies
# This file describes how to build custom virtualbox instances. This examples ignores things like cross compiling etc..
# this defines the function signature of our expression, pkgs is defaulted to the systems packages,
# you could also overrides that if you need a specific release / channel.
{ pkgs ? import <nixpkgs> {}}:
# "let" expressions are just there to introduce scoped variables and functions,
# in this case it is declaring just a helper function
let
# this creates a helper function that abstracts a bit of the boilerplate away
# `mkVM` takes one argument, a list of `modules` to include in the image.
@benjivesterby
benjivesterby / commonssids.txt
Created December 13, 2024 23:59 — forked from jgamblin/commonssids.txt
5000 most of common SSID names from https://wigle.net/stats#ssidstats
ssid
xfinitywifi
linksys
<no ssid>
BTWiFi-with-FON
NETGEAR
Ziggo
dlink
BTWifi-X
default
@benjivesterby
benjivesterby / rsacrypto.go
Created October 8, 2024 20:31 — forked from dadencukillia/rsacrypto.go
Golang rsa module with chunk encryption and decryption
// Adapted from: https://gist.github.com/miguelmota/3ea9286bd1d3c2a985b67cac4ba2130a
package rsacrypto
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"fmt"
@benjivesterby
benjivesterby / sec_news.opml
Created September 23, 2024 17:10 — forked from sathwikv143/sec_news.opml
Cyber Sec News Feeds
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<head>
<title>MyFeed</title>
</head>
<body>
<outline title="Blogs" text="Blogs">
<outline title="The Cloudflare Blog" type="rss" xmlUrl="https://blog.cloudflare.com/rss/" text="The Cloudflare Blog" htmlUrl="https://blog.cloudflare.com/" />
<outline xmlUrl="https://www.rossmanngroup.com/feed/" title="Rossmann Repair Group" text="Rossmann Repair Group" type="rss" htmlUrl="https://rossmanngroup.com" />
<outline text="Google Online Security Blog" type="rss" htmlUrl="http://security.googleblog.com/" xmlUrl="https://security.googleblog.com/feeds/posts/default?alt=rss" title="Google Online Security Blog" />
@benjivesterby
benjivesterby / windows_open_thermo.yaml
Created August 27, 2024 22:39
Turn off Thermostat when Windows Are Open
#ver. 1.7
blueprint:
name: HVAC Pause V1.7
description: Pauses HVAC when windows/doors open; resumes last state once closed
domain: automation
source_url: https://gist.github.com/raffy-ops/2bdf967036d8d274fb1f62572ed5e545
input:
climate_device:
description: Climate entity used for climate control.
name: Climate Device
@benjivesterby
benjivesterby / protect_doorbell.yaml
Last active August 25, 2024 22:39
UniFi Protect Doorbell Ring Notifications
blueprint:
name: UniFi Protect Doorbell Ring Notifications
domain: automation
source_url: https://raw.githubusercontent.com/AngellusMortis/unifiprotect_blueprints/main/blueprints/automation/unifiprotect/notification_ring_event.yaml
description: "## UniFi Protect Doorbell Ring Notifications\n\nThis blueprint will
send push notifications to a Home Assistant mobile app when a doorbell ring is
detected.\n\n### Required Settings\n\n - UniFi Protect Doorbell Sensor\n\n###
Optional Settings\n\n - Notification target for the [mobile app notification
target][1].\n - Cutoff time before ring event for video clips.\n - Time formatting
strings. Timestamp is injected into the notification in case the notification
@benjivesterby
benjivesterby / protect_motion.yaml
Last active August 25, 2024 22:40
UniFi Protect Motion / Smart Detection Notifications
blueprint:
name: UniFi Protect Motion / Smart Detection Notifications
domain: automation
source_url: https://raw.githubusercontent.com/AngellusMortis/unifiprotect_blueprints/main/blueprints/automation/unifiprotect/notification_smart_motion_event.yaml
description: "## UniFi Protect Motion / Smart Detection Notifications\n\nThis blueprint
will send push notifications to a Home Assistant mobile app when a camera detections
motion or a\nsmart detection.\n\n### Required Settings\n\n - UniFi Protect Detection
Sensor\n\n### Optional Settings\n\n - Notification target for the [mobile app
notification target][1].\n - Presence filter - list of mobile phones or other
entities that should be within the \"home\" zone\n - Alarm entity to check arm
@benjivesterby
benjivesterby / protect_license_plate.yaml
Last active August 25, 2024 22:40
UniFi Protect License Plate Notifications
blueprint:
name: UniFi Protect License Plate Notifications
domain: automation
source_url: https://raw.githubusercontent.com/AngellusMortis/unifiprotect_blueprints/main/blueprints/automation/unifiprotect/notification_smart_licenseplate_event.yaml
description:
"## UniFi Protect License Plate Notifications\n\nThis blueprint will
send push notifications to a Home Assistant mobile app when an AI series series
camera detects\na License Plate.\n\n### Required Settings\n\n - UniFi Protect
License Plate Sensor\n\n### Optional Settings\n\n - Notification target for the
[mobile app notification target][1].\n - Time formatting strings. Timestamp is