Skip to content

Instantly share code, notes, and snippets.

View trungie's full-sized avatar

Trung Hoang trungie

View GitHub Profile
@trungie
trungie / gist:2ac4d0f1fbc3ec55e2918d2021dbd388
Created October 28, 2024 03:59
Powershield UPS SNMP OIDs used for monitoring via Home assistant SNMP..
PowerShield Centurion RT 1000 UPS Monitoring in Home Assistant
Step 1: Discover SNMP OIDs
To find OIDs for monitoring, use:
snmpwalk -v 2c -c public 192.168.1.250 1.3.6.1.4.1.935
Sample Output:
Battery Charge (%): 1.3.6.1.4.1.935.1.1.1.2.2.1.0
Battery Temp (°C): 1.3.6.1.4.1.935.1.1.1.2.2.2.0
ssh-dss AAAAB3NzaC1kc3MAAACBAIWa41mozZopDljzMGP5vBDrQ0GW3Tamt+FQnwjOAR05kTinwQywhha00r4s0nGkqjxjzJsiaUD+fOib1DyR2a72fM+rFHPPdC9E5J3W0ZMr9NS2r5xmdPX31ObYSfPWK8npQ4/s5Yb1zVEtCFH422sjPtIiMDZHIJSwOsIIN9JVAAAAFQDHdgmQr08+Y01+etLqh9XPQNxEBQAAAIAZlMpOpDfH9IuXvJdDk/kUeDAIUlOwOd4ht5WXSCQYUbMy92Jpy5qkKgebds4+UwW1YYI5kLUIYVcihKjRk1xmJGoWsoxI/KRi8V/3oUEtAXvcXi2V0DkF7YLYuruaoDtl2uK6qR5l20tZh5MA9gS7K8SBqIc2tey/nQbOEeG0XQAAAIAJq3kqND+YXLPz7YjRECfc1XoROTSWjBWQNOavsjixvTxYXffsqhqms2BU5j+7i0+O/G0JTsAhJHIHq6/g/LzDaoBxt9BvJ9Us+Fg9UAiVhb62SwQkLdqMRSgqD0jk8pwpYgMt27zdYBc9Fz3SM1Ew0MChz8IgoBADGNpnuYeaPA== [email protected]
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⠉⣉⣉⣉⣉⣉⣉⣉⣉⠉⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⠀⡇⠀⠀⠀⠀⠀⠀⢸⠀⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡀⢉⡏⠀⠀⠀⠀⠸⡍⢀⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣃⠼⠤⢤⣴⣇⠀⠀⢳⠈⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⠿⠿⣿⡿⢋⣤⠞⢁⢚⠉⢿⡏⢱⡨⣷⠚⢋⣹⡿⣿⡿⣿⣿
⡿⠟⣇⢰⡶⠂⡠⣛⠋⣠⠃⠆⡔⠰⢡⠃⣊⠌⡘⢰⢡⣈⠂⡞⣸⡻
⠰⣶⠿⢋⣠⣾⠃⣇⣐⡹⢒⡶⠗⠒⠒⠓⠒⠒⠶⠾⠶⣶⣶⡾⠟⢡
⣷⣶⣾⣿⣿⡏⢰⠃⢠⣞⣁⣀⡀⢀⡠⠤⡤⠤⠤⣤⠤⣤⣤⣶⣾⣿
⣿⣿⣿⠉⣉⣀⡏⠀⠁⣜⣀⠀⣷⣷⡆⢀⣱⠀⠀⠸⣄⣉⠉⣿⣿⣿
#!/bin/bash
function status() {
kextstat | grep org.virtualbox.kext > /dev/null 2>&1 ;
vbox=$((1-$?))
kextstat | grep com.github.osxfuse > /dev/null 2>&1 ;
fuse=$((1-$?))
}
status

Keybase proof

I hereby claim:

  • I am trungie on github.
  • I am trunghoang (https://keybase.io/trunghoang) on keybase.
  • I have a public key ASCnlH5FrfbaKO-T2pGNVSYG2JIs5tTblvNtp8Mizs4xYAo

To claim this, I am signing this object:

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
#!/bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.