Skip to content

Instantly share code, notes, and snippets.

😃

FLEISCHMANN György, _flex, Gyurci, FleXoft FleXoft

😃
View GitHub Profile
View TSM NAS share backup
@echo off
set machinename=nas1bud1hu
set nasbackuplog=nasbackuplog.txt
set exitcode=0
cd "C:\Program Files\Tivoli\TSM\baclient"
net use \\nas1bud1hu\common /user:admin ********** > %nasbackuplog%
@FleXoft
FleXoft / HPE Service Manager loop
Last active Nov 28, 2018
HPE Service Manager
View HPE Service Manager loop
function countTABLE( table, query ) {
var fTABLE = new SCFile( table, SCFILE_READONLY );
var rc = fTABLE.doSelect( query );
if ( rc == RC_SUCCESS ) {
do {
print(fTABLE.id+ "_"+fTABLE.name);
} while ( fTABLE.getNext() == RC_SUCCESS )
}
@FleXoft
FleXoft / node.js
Created Nov 20, 2018
javascript parameters
View node.js
var header = [ "h1", "h2", "h3", "h4" ];
var col1 = [ 11, 12, , 14 ];
var col2 = [ 21, 22, 23, 24 ];
var col3 = [ 31, , 33, 34 ];
var col4 = [ 41, 42, 43, 44 ];
var col5 = [ 51, 52, 53, ];
function sortWords() {
columns = ( arguments[0].length );
@FleXoft
FleXoft / bash
Created Nov 7, 2018
Bash script that handles optional input arguments
View bash
$ cat somecommand.sh
#! /usr/bin/bash
ARG1=${1:-foo}
ARG2=${2:-bar}
ARG3=${3:-1}
ARG4=${4:-$(date)}
echo "$ARG1"
@FleXoft
FleXoft / bash
Created Nov 7, 2018
Numbered for-loop in shell with leading zeros
View bash
for (( num=1; num<=5; num++ )); do printf "%02d\n" $num; done
seq -f '%02g' 1 5
for num in $( seq -w 01 05 ); do echo $num; done
// from bash 4.0 onward
echo {01..05}
@FleXoft
FleXoft / shell
Created Nov 1, 2018
Make every 3rd line of input green to make it easier to follow the lines among others
View shell
function thirdline(){ awk '{if ( NR%3==0 ){ print "\033[32m" $0 "\033[0m"} else{ print } }'; }
@FleXoft
FleXoft / nfs
Created Oct 26, 2018
EG nfs mount
View nfs
mount -t nfs effectivedisk.eg.office:/volume3/EffectiveInstall /mnt/
@FleXoft
FleXoft / java
Created Oct 24, 2018
macOS Oracle java environment setting
View java
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
View jekyll
sudo gem update jekyll
@FleXoft
FleXoft / PhotoSwipeGenerator
Created Sep 9, 2018
photo generation workflow for andras.fleischmann.hu
View PhotoSwipeGenerator
cd ~/gith/andras.fleischmann.hu/
PhotoSwipeGenerator.pl -verb
jekyll b
cp _site/ii.html index.html
open index.html
You can’t perform that action at this time.