Skip to content

Instantly share code, notes, and snippets.

View thost96's full-sized avatar

Thorsten thost96

View GitHub Profile
@thost96
thost96 / philips-android-tv
Created December 26, 2020 13:54
Postman libary for Android based Philips TV
{
"info": {
"_postman_id": "af626e59-7238-483d-8c04-423c73437442",
"name": "Philips TV 2020",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Audio",
"item": [
@thost96
thost96 / supermicro-java-console.sh
Created July 31, 2018 13:06 — forked from DavidWittman/supermicro-java-console.sh
Retrieves the plaintext JNLP for the iKVM console from a SuperMicro IPMI webserver
#!/usr/bin/env bash
# Retrieves the plaintext JNLP from a SuperMicro IPMI webserver
# Usage: supermicro-java-console.sh <hostname>
# supermicro-java-console.sh 10.1.2.34 > login.jnlp
set -x
HOST="$1"
IPMI_USER=${IPMI_USER:-ADMIN}
@thost96
thost96 / supermicro-bmc-reset.sh
Created July 31, 2018 13:05 — forked from DavidWittman/supermicro-bmc-reset.sh
Issues a reset of the SuperMicro BMC via the web interface
#!/usr/bin/env bash
# Issues a reset of the SuperMicro BMC via the web interface
#
# usage: supermicro-bmc-reset.sh <ipmi-host>
# e.g.: supermicro-bmc-reset.sh 10.0.0.1
#
set -x
#!/usr/bin/env bash
# Loads and mounts an ISO over SMB via the
# SuperMicro IPMI web interface
#
# usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path>
# e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso'
set -x
@thost96
thost96 / doskeys.bat
Last active May 8, 2020 11:53
Windows Comand Line Aliases
:: https://gist.github.com/PierreMage/6874814#file-doskey-bat-L30
:: https://stackoverflow.com/questions/4186427/how-do-you-write-comments-in-doskey-macro-files
:: https://superuser.com/questions/247548/doskey-for-compound-command/788209
@echo off
:: Add this file as a REG_SZ/REG_EXPAND_SZ registry variables in HKEY_LOCAL_MACHINE\Software\Microsoft\Command or Processor\AutoRun HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
:: Use $T to run multiple commands e.g.: command1 $T command2
:: F7 = history
:: Alt+F7 = history -c
:: F8 = Ctrl+R
@thost96
thost96 / foldersize.php
Created January 4, 2018 18:30 — forked from eusonlito/foldersize.php
PHP function to get the folder size including subfolders
<?php
function folderSize ($dir)
{
$size = 0;
foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
$size += is_file($each) ? filesize($each) : folderSize($each);
}
@thost96
thost96 / hexToRgb.sh
Created December 22, 2017 13:23
Hex to RGB
#!/bin/bash
hex=$1
printf "%d,%d,%d" 0x${hex:0:2} 0x${hex:2:2} 0x${hex:4:2}
@thost96
thost96 / reconnectFritzBox7490.sh
Last active January 29, 2019 18:12 — forked from jmark/reconnectFritzBox7360SL.sh
Bash script: Force reconnect for router Fritz!Box 7360 SL (FRITZ!OS: 06.20)
#!/bin/bash
payload=$(cat <<EOF
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" />
</s:Body>
</s:Envelope>