Skip to content

Instantly share code, notes, and snippets.

View loitho's full-sized avatar

loitho

View GitHub Profile
@thedoc31
thedoc31 / grafana-dashboard-import.sh
Last active November 7, 2022 12:53
Bash script to batch Import dashboard JSON files into Grafana. Verified working on v6.3. This script is based on the Grafana dashboard export script originated on https://gist.github.com/crisidev/bd52bdcc7f029be2f295
#!/bin/bash
#
# add the "-x" option to the shebang line if you want a more verbose output
#
#
OPTSPEC=":hp:t:k:"
show_help() {
cat << EOF
Usage: $0 [-p PATH] [-t TARGET_HOST] [-k API_KEY]
@kaysond
kaysond / fanctl.sh
Last active June 1, 2024 17:26
Dell Poweredge R710 R720 Fan Noise Control Script
#!/usr/bin/env bash
#You'll need to enable IPMI over lan in idrac first
#iDRAC Settings -> Network -> IPMI Settings
#Channel Privilege Level Limit needs to be Administrator
#You may want to create a dedicated username/pass with IPMI permission in iDRAC Settings -> User Authentication
IPMIHOST=idracip
IPMIUSER=username
IPMIPW=password
IPMIEK=0000000000000000000000000000000000000000
@jclaret
jclaret / Satellite
Last active December 2, 2021 15:56
# Satellite
## Tasks Status
sudo su - postgres -c "psql -d foreman -c 'select label,count(label),state,result from foreman_tasks_tasks where state <> '\''stopped'\'' group by label,state,result ORDER BY label;'"
## Foreman-rake commands - https://access.redhat.com/solutions/1754193
### Cancel Tasks
> foreman-rake console
irb(main):001:0> ForemanTasks::Task.find("799bc5fb-2d4c-4d0d-9d7d-4e42e9a8ace8").destroy
### Synchronize a repository from CDN
@Velocet
Velocet / Unlock-PowerCfg.ps1
Last active May 2, 2025 18:37
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
@bomberstudios
bomberstudios / keeps_in_europe.md
Created October 4, 2020 14:27
Keyboard Shops in Europe
@lukeplausin
lukeplausin / transfer_ssm_file.sh
Last active May 2, 2025 10:54
Transfer a file to EC2 SSM instance without using S3 (SSM only)
# This script will explain how to transfer a file to EC2 using SSM ONLY!
# You will need to have permission to run SSM commands on the target machine and have sudo access as well
# Infos
INSTANCE_ID=i-1234567890
FILE_NAME=the_file.tar.gz
# Step 1: Run command on machine to install netcat and dump from port to filename
# < Start session