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 / 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
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 26, 2024 17:20
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@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|
@idleberg
idleberg / atom-macos-context-menu.md
Last active April 27, 2022 00:37
“Open in Atom” in macOS context-menu

Open in Atom

  • Open Automator
  • Create a new Service
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /usr/local/bin/atom -n "$@"
  • Set “Pass input” to as arguments
  • Save as Open in Atom
@fduran
fduran / Linux Bash generate a number of files of random sizes in a range
Last active January 12, 2024 19:43
Linux Bash generate a number of files of random sizes in a range
#!/bin/bash
# generate a number of files with random sizes in a range
min=1 # min size (MB)
max=10 # max size (MB)
nofiles=20 # number of files
for i in `eval echo {1..$nofiles}`
do
dd bs=1M count=$(($RANDOM%max + $min)) if=/dev/urandom of=./files/file$i