Skip to content

Instantly share code, notes, and snippets.

Avatar
😃

FLEISCHMANN György, _flex, Gyurci, FleXoft FleXoft

😃
View GitHub Profile
@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!"
@FleXoft
FleXoft / List of virtual FC adapters and their WWNs on the HMC using hscroot (find all servers in Operational state and all LPARs on them):
Last active Jan 13, 2021
List of virtual FC adapters and their WWNs on the HMC using hscroot (find all servers in Operational state and all LPARs on them):
View List of virtual FC adapters and their WWNs on the HMC using hscroot (find all servers in Operational state and all LPARs on them):
lssysconn -r all -F resource_type,state,type_model_serial_num | grep '^sys,Connected' | cut -d',' -f3 | while read name; do echo ${name}; lshwres -r virtualio --rsubtype fc -m ${name} --level lpar -F lpar_name,slot_num,wwpns --header | grep -v null; done
@FleXoft
FleXoft / List of physical FC adapters and their WWNs on the VIO server by padmin users (lists only the adapters of the given VIO server):
Last active Jan 13, 2021
List of physical FC adapters and their WWNs on the VIO server by padmin users (lists only the adapters of the given VIO server):
View List of physical FC adapters and their WWNs on the VIO server by padmin users (lists only the adapters of the given VIO server):
lsdev -type adapter -state available | grep '^fcs' | while read name rest; do lsdev -dev ${name} -vpd | grep -E "${name} |Network Address"; done
@FleXoft
FleXoft / Listing physical and virtual FC adapters and their WWNs on the server as root (lists only the adapters for that server):
Last active Jan 13, 2021
Listing physical and virtual FC adapters and their WWNs on the server as root (lists only the adapters for that server):
View Listing physical and virtual FC adapters and their WWNs on the server as root (lists only the adapters for that server):
lsdev -S a -Cc adapter | grep '^fcs' | awk '{print $1}' | while read name; do lscfg -vl ${name} | grep -E "${name}|Network Address"; done
@FleXoft
FleXoft / Recursively counting files in a Linux directory
Created May 15, 2020
Recursively counting files in a Linux directory
View Recursively counting files in a Linux directory
find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo $(find "{}" | wc -l) "{}"'
@FleXoft
FleXoft / kef search
Last active Apr 10, 2020
KEF search
View kef search
@FleXoft
FleXoft / codesign
Created Mar 28, 2019
OS X codesign
View codesign
codesign -f -s - --deep
@FleXoft
FleXoft / hr
Created Dec 28, 2018
Term size line
View hr
hr(){ yes -- ${@:-=} | tr -d $'\n' | head -c $COLUMNS ; }