Skip to content

Instantly share code, notes, and snippets.

Avatar
😃

FLEISCHMANN György, _flex, Gyurci, FleXoft FleXoft

😃
View GitHub Profile
View soco
import soco
from soco import SoCo
speaker_list = list(soco.discovery.scan_network())
speaker_list[0].player_name
speaker_list[0].mute
speaker_list[0].mute()
speaker_list[0]
my_zone = SoCo('192.168.0.2')
@FleXoft
FleXoft / Microsoft Autoupdate in MacOS v4.xx Update Error
Last active Nov 25, 2021
Microsoft Autoupdate in MacOS v4.xx Update Error (Updates are temporarily unavailable.)
View Microsoft Autoupdate in MacOS v4.xx Update Error
/bin/launchctl stop /Library/LaunchAgents/com.microsoft.update.agent.plist
/bin/launchctl unload -w /Library/LaunchAgents/com.microsoft.update.agent.plist
/bin/launchctl load -w /Library/LaunchAgents/com.microsoft.update.agent.plist
@FleXoft
FleXoft / PowerShell SMTP sender
Created Jul 27, 2021
PowerShell SMTP sender
View PowerShell SMTP sender
$emailSmtpServer = "smtp.xxxx.hu"
$emailSmtpServerPort = "25"
$emailSmtpUser = ""
$emailSmtpPass = ""
$emailFrom = "HpOneTouch-Teszt@xxxx.hu"
$emailTo = "gyorgy.fleischmann@fnxs.hu"
$emailcc="CC"
$emailMessage = New-Object System.Net.Mail.MailMessage( $emailFrom , $emailTo )
@FleXoft
FleXoft / Linux increase root xfs partition size
Created Jul 6, 2021
Linux increase root xfs partition size
View Linux increase root xfs partition size
# Base source: https://www.miarec.com/doc/administration-guide/doc1012
fdisk /dev/sda
poweroff
increase disk size at VMware side
fdisk /dev/sda
n
p
View linux_pv_vg_lv_mkfs
pvcreate /dev/sdc1
vgcreate vtl-media /dev/sdc1
lvcreate -n lv_vtl-media vtl-media --size 1500G
mkfs.xfs -L vtl-media /dev/mapper/vtl--media-lv_vtl--media
cat /etc/fstab
@FleXoft
FleXoft / Db2 delete archive logs in every 10 minutes
Created Apr 30, 2021
Db2 delete archive logs in every 10 minutes
View Db2 delete archive logs in every 10 minutes
while :; do find /tsmarchlog/tsminst1/TSMDB1/NODE0000/LOGSTREAM0000/C0000001/ -name '*.LOG' -mmin +1 -exec echo "{}" \; -exec rm -rf {} \; ; date; echo "Sleeping..."; sleep 600; done
View X after sudo
xauth add $(xauth -f ~flex/.Xauthority list|tail -1)
@FleXoft
FleXoft / Password shortcut to Microsoft Windows clipboard
Last active Feb 17, 2021
Password shortcut to Microsoft Windows clipboard
@FleXoft
FleXoft / BATCH simple loop template
Created Jan 21, 2021
BATCH simple loop template
View BATCH simple loop template
set loopcount=[Number of times]
:loop
[Commands you want to repeat]
set /a loopcount=loopcount-1
if %loopcount%==0 goto exitloop
goto loop
:exitloop
@FleXoft
FleXoft / BATCH loop counter with leading zero
Created Jan 18, 2021
BATCH loop counter with leading zero
View BATCH loop counter with leading zero
@echo off
setlocal enabledelayedexpansion
SET d=10
for /L %%t IN ( ) DO (
SET /A d = !d! + 10
rem echo alma !d!
set "formattedValue=0000000000!d!"