Skip to content

Instantly share code, notes, and snippets.

View FleXoft's full-sized avatar
😃

FLEISCHMANN György, _flex, Gyurci, FleXoft FleXoft

😃
View GitHub Profile
@FleXoft
FleXoft / HPE SM delete all tables before system-load (MS SQL)
Last active November 30, 2018 08:11
HPE SM delete all tables before load (MS SQL)
SELECT 'drop table', name, ';' FROM sysobjects WHERE xtype='U' order by name
@FleXoft
FleXoft / HPE SM Oracle user settings
Created November 30, 2018 12:36
HPE SM Oracle user settings
sqlplus / as sysdba
create user smadmin identified by smadmin default tablespace users quota unlimited on users;
alter user smadmin default tablespace users;
alter user smadmin temporary tablespace temp;
alter user sys identified by password;
grant create materialized view TO smadmin;
grant create session ,alter session ,create synonym ,create view ,create table ,create sequence TO smadmin;
@FleXoft
FleXoft / hr
Created December 28, 2018 12:07
Term size line
hr(){ yes -- ${@:-=} | tr -d $'\n' | head -c $COLUMNS ; }
@FleXoft
FleXoft / codesign
Created March 28, 2019 20:10
OS X codesign
codesign -f -s - --deep
@FleXoft
FleXoft / kef search
Last active April 10, 2020 09:19
KEF search
@FleXoft
FleXoft / Recursively counting files in a Linux directory
Created May 15, 2020 12:39
Recursively counting files in a Linux directory
find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo $(find "{}" | wc -l) "{}"'
@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 January 13, 2021 13:27
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 / 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 January 13, 2021 13:27
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 / 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 January 13, 2021 13:27
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 / BATCH loop counter with leading zero
Created January 18, 2021 19:30
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!"