linux

LSI / Broadcom MegaRAID Storcli

# install storcli (MegaCli)
# https://www.broadcom.com/products/storage/raid-controllers/megaraid-sas-9361-4i#downloads

apt install -y unzip
wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/007.0606.0000.0000_Unified_StorCLI.zip -O /tmp/StorCLI.zip
unzip /tmp/StorCLI.zip -d /tmp/
unzip /tmp/MR_SAS_Unified_StorCLI_*.zip -d /tmp
unzip /tmp/versionChangeSet/univ_viva_cli_rel/Unified_storcli_all_os.zip -d /tmp/
dpkg -i /tmp/Unified_storcli_all_os/Ubuntu/storcli_*_all.deb
ln -s /opt/MegaRAID/storcli/storcli64 /usr/local/sbin/storcli

or

Install Wine

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.wine.sh";
echo "wget $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Downgrade to lastest Wine 1.2 (64 bit)
sudo apt-get remove wine1.4
cd /tmp
wget http://ie.archive.ubuntu.com/ubuntu/pool/universe/w/wine1.2/wine1.2_1.2.3-0ubuntu1_amd64.deb
wget http://ie.archive.ubuntu.com/ubuntu/pool/universe/n/nss-mdns/lib32nss-mdns_0.10-3.1ubuntu1_amd64.deb
sudo dpkg -i wine1.2_1.2.3-0ubuntu1_amd64.deb lib32nss-mdns_0.10-3.1ubuntu1_amd64.deb
wine --version

OPTIONAL: fake ie6 installation
wget kegel.com/wine/winetricks -P /tmp; sh /tmp/winetricks fakeie6

Compile wine
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get build-dep wine1.3
sudo apt-get --build source wine1.3
./configure
make

LINKS
http://appdb.winehq.org/ - supported applicatinos
http://www.winehq.org/site/download-deb - Wine for Debian based distributions
http://wiki.winehq.org/AdobePhotoshop
http://wiki.winehq.org/AdobeAcrobatPro

nmap

scan for IPs and ports
nmap -PR -oN /tmp/nmap.out 192.168.1.0/24

search hosts
nmap -sP 192.168.1.*
nmap -PR -oN /tmp/nmap.out 192.168.1.0/24

scan for open ports
nmap -T4 -sS 192.168.1.100

get more detailed information
sudo nmap -O 192.168.1.100 -T4

scan one port
nmap -sV -P0 -p 22 -vv 192.168.1.100

LINKS
http://linuxwiki.de/nmap

sed

# remove third line
sed -i 3d

# insert line on beginning of a file
sed -i '1i MY_TEXT'

# String replace with sed
sed -i 's|STRING_FROM|STRING_TO|g' FILE
sed -i 's|[#]*param=[yes|no]*|param=yes|g' FILE

# add line to a file
sed -i '13i\YOUR_TEXT' FILE

# add line before last line
sed -i '$i test_line' /path/to/file

# search block
sed -n '/FOO/,/BAR/p' /path/to/file

# remove digits
echo $FOO | sed 's/[^0-9]*//g'

# remove blanks (trim)
cat FILE | sed 's/ */ /g'
# remove blanks and tabs
cat FILE | sed "s/[ \t][ ]*/ /g"

# write to file

apt / dpkg

# run update
export DEBIAN_FRONTEND=noninteractive
LANG=en_US.UTF-8 sudo apt-get update -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean -y

# allow unauthenticated repository
apt-get update --allow-unauthenticated

# list updatable packages
apt list --upgradable

# view avaiable package version
apt-cache show wget
apt-cache madison wget

# install specific version
apt-get install package name=version
apt-get install wget=1.6

# install from specific repository
apt-get install -t squeeze-backports wget

# view available versions

SSH

create SSH key
ssh-keygen -q -b 4096 -f ~/.ssh/id_rsa -N '' -C "${USER}@$(hostname -f)"

Copy public key to server (/home/foo/.ssh/authorized_keys)
ssh-copy-id foo@example.com

show log
tail -f /var/log/auth.log
journalctl _COMM=sshd -f

# configuration
~/.ssh/config: user configuration
/etc/ssh/ssh_config: system-wide client configuration
/etc/ssh/sshd_config: system-wide server configurtion

http://www.panticz.de/SSH-server-enable-disable-password-authentication
http://www.panticz.de/ssh_pre-shared-key_authentication

Kyocera FS-1030D

Download PPD files for kyocera printer
wget http://cdn.kyostatics.net/dlc/de/driver/all/linux_ppd_s_ksl_8.-downloadcenteritem-Single-File.downloadcenteritem.tmp/Linux_PPDs_KSL8_4.zip -P /tmp/
unzip /tmp/Linux_PPDs_KSL8_4.zip -d /tmp

# create new printer
lpadmin -p Kyocera_FS1010 -v socket://192.168.1.11:9100 -E -P "/tmp/PPD's_KSL_8.4/German/Kyocera_Mita_FS-1010_de.ppd"
#-o PageSize=A4

system-config-printer

install
#wget http://dl.dropbox.com/u/4170695/www/Kyocera-FS-1010.ppd -P /tmp

Ubuntu 24.04 Noble Numbat LTS

Schedule
https://wiki.ubuntu.com/BionicBeaver/ReleaseSchedule

ReleaseNotes
https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes

Repository
echo "deb http://de.archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse" > /etc/apt/sources.list.d/bionic-updates.list
echo "deb http://archive.ubuntu.com/ubuntu/ bionic-proposed restricted main multiverse universe" > /etc/apt/sources.list.d/proposed-updates.list
apt-get install netplan.io/bionic-proposed

Download