Skip to content

Instantly share code, notes, and snippets.

@powareverb
powareverb / homeassistant.yaml
Created October 4, 2024 01:40 — forked from cerebrate/homeassistant.yaml
Bluetooth in Home Assistant on Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: homeassistant
name: homeassistant
namespace: homeassistant
spec:
replicas: 1
selector:
@powareverb
powareverb / pwsh-rpi-ubuntu.sh
Created August 6, 2022 14:43
pwsh-rpi-ubuntu
# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Download the Microsoft repository GPG keys
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
@powareverb
powareverb / pwsh-rpi.sh
Last active August 6, 2022 14:40
pwsh-rpi
###################################
# Prerequisites
# Update package lists
sudo apt-get update
# Install libunwind8 and libssl1.0
# Regex is used to ensure that we do not install libssl1.0-dev, as it is a variant that is not required
sudo apt-get install '^libssl1.0.[0-9]$' libunwind8 -y
@powareverb
powareverb / bootstrap.ps1
Last active November 6, 2020 06:29
Bootstrap Heph
# Run this script:
# $gistuser = "powareverb"; $gistId="9ef1eeb58b60e4338b13c9d9d19d460a"; . { iwr -useb https://gist.githubusercontent.com/$gistuser/$gistid/raw/bootstrap.ps1 } | iex; Invoke-BootstrapMachine -machinename $(hostname);
function Invoke-GetChocolatey() {
# Choco boot
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
function Invoke-GetBoxStarter() {
# Boxstarter
@powareverb
powareverb / README.md
Created April 2, 2020 05:48
K3S and Rio on WSL2

Install Rio on K3S running in WSL2 on Windows

Info

  • K3S is a certified kubernetes distro for edge and other scenarios
  • Rio simplifies application development on kubernetes
  • WSL2 run linux on windows, nicer and more integrated than a traditional vm on hyper-v

Prerequisites

  • Windows 10 with WSL2 set as default
@powareverb
powareverb / MobyLinux.ps1
Created October 25, 2019 04:04 — forked from biggyspender/MobyLinux.ps1
Set DockerNAT switch to be a private network
# See comment lines prefixed with ADDED
# It might be necessary to delete the existing DockerNAT switch in hyper-v manager
<#
.SYNOPSIS
Manages a MobyLinux VM to run Linux Docker on Hyper-V
.DESCRIPTION
Creates/Destroys/Starts/Stops A MobyLinux VM to run Docker on Hyper-V
.PARAMETER VmName
@powareverb
powareverb / wishlist.md
Created August 6, 2019 23:29
List of things I should look at
@powareverb
powareverb / transform-xml.ps1
Created January 3, 2017 04:37 — forked from sayedihashimi/transform-xml.ps1
Script which can be used to transform an XML file using XDT. All you need to do is download the script and call it. The script will download the files it needs to run.
<#
.SYNOPSIS
You can use this script to easly transform any XML file using XDT.
To use this script you can just save it locally and execute it. The script
will download it's dependencies automatically.
#>
[cmdletbinding()]
param(
[Parameter(
Mandatory=$true,
@powareverb
powareverb / Convert-TextColumnsToObject.ps1
Last active November 29, 2016 23:19
Convert-TextColumnsToObject.ps1
# Example:
# $data= @"
# DRIVER VOLUME NAME
# local 004e9c5f2ecf96345297965d3f98e24f7a6a69f5c848096e81f3d5ba4cb60f1e
# local 081211bd5d09c23f8ed60fe63386291a0cf452261b8be86fc154b431280c0c11
# local 112be82400a10456da2e721a07389f21b4e88744f64d9a1bd8ff2379f54a0d28
# "@
# $obj=Convert-TextColumnsToObject $data
# $obj | ?{ $_."VOLUME NAME" -match "112be" }
function Convert-TextColumnsToObject($dataVar)
@powareverb
powareverb / .bash_profile
Created November 6, 2016 05:21 — forked from gjonespf/.bash_profile
default bash profile
export EDITOR="nano -w"
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -lah --color'
alias lx='ls -lXB' # Sort by extension.
alias lk='ls -lSr' # Sort by size, biggest last.
alias lt='ls -ltr' # Sort by date, most recent last.
alias lc='ls -ltcr' # Sort by/show change time,most recent last.