Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Add Hildebrand CAD Entities
description: Create devices and entities using MQTT discovery
domain: script
source_url: https://gist.github.com/si458/2a9ec8d0e2b07205e4859886cc5222b0
input:
input_cad_mac:
name: MAC Address
description: "MAC address of CAD (without :s)"
default: ""
@si458
si458 / virt-customize-ubuntu22
Last active February 17, 2024 01:06
virt-customize ubuntu22
#!/bin/sh
# install tools
apt update -y && apt install nano wget curl libguestfs-tools -y
# remove old image
rm -rfv ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
# remove old template container - WILL DESTROY COMPLETELY
qm destroy 9000 --destroy-unreferenced-disks 1 --purge 1
# download new image
wget http://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64-disk-kvm.img
# add agent to image
@si458
si458 / PVE-HP-ssacli-smart-storage-admin.md
Last active October 18, 2023 00:31 — forked from Philhil/PVE-HP-ssacli-smart-storage-admin.md
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (7.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (7.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@si458
si458 / build.js
Last active December 28, 2023 10:18
build script for pkg with icon and metainfo
if (process.argv[2] == undefined) process.exit(0);
if (process.argv[2] == "") process.exit(0);
const { pkg_fetch_version, node_version, pkg_cache_path, icon, version, description, company, name, copyright, file } = require(`./${process.argv[2]}.json`);
const ResEdit = require('resedit');
const path = require("path");
const fs = require('fs');
const https = require('https');
function download(url, dest) {
return new Promise((resolve, reject) => {
fs.access(dest, fs.constants.F_OK, (err) => {
@si458
si458 / ubuntu_install_stuff
Last active September 15, 2023 12:31
ubuntu_install_stuff
#!/bin/bash
echo Starting ...
echo Setting Variables ...
MARIADB=10.11
NODEJS=18
PHPMYADMIN=5.2.1
ADMINER=4.8.1
PHP=8.2
@si458
si458 / openebs-uninstall.sh
Created February 9, 2021 14:08
openebs uninstall script
#!/bin/bash
# Copyright 2020 The OpenEBS Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@si458
si458 / nfsen_setup_ubuntu
Last active May 27, 2020 10:55
nfsen_setup_ubuntu
#!/bin/bash
echo Starting ...
echo Cleaning apt-get ...
apt-get clean all -y
echo Updating apt-get ...
apt-get update
@si458
si458 / genieacs-install.sh
Last active April 22, 2020 22:10 — forked from allanmc/genieacs-install.sh
Install GenieACS on Ubuntu 16.04
#!/bin/sh
set -e
# install all updates/upgrades to begin with
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
# install essential packages
sudo apt-get install -y build-essential git curl software-properties-common python-software-properties zlib1g-dev tmux libsqlite3-dev
# install nodejs
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
@si458
si458 / simulator_populator_xcode
Last active June 22, 2020 18:42 — forked from danielribeiro/simulator_populator_xcode7
This script removes and recreates all simulators in Xcode.
#!/usr/bin/env ruby
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`
devices['devices'].each do |runtime, runtime_devices|
runtime_devices.each do |device|