Skip to content

Instantly share code, notes, and snippets.

@deviousway
deviousway / frimware dell live iso
Last active February 20, 2018 02:49
update firmware on Dell servers on production from dell live iso (Centos7)
download iso from repo
https://www.dell.com/support/article/us/en/04/sln296511/updating-dell-poweredge-servers-via-bootable-media-iso?lang=en
mkdir -p /mnt/disk
mount -o loop download /mnt/disk
#where "download" is name of downloaded file.
yum install -y glibc.i686 procmail compat-libstdc++-33.i686 libxml2.i686 libstdc++.i686
cd /mnt/disk/drm_files/repository/System$$$$$$$
sh ./apply_components.sh
@deviousway
deviousway / mount iso linux.txt
Last active January 27, 2018 08:14
mount iso linux
mkdir -p /mnt/disk
mount -o loop $$$$.iso /mnt/disk
yum install squashfs-tools
unsquashfs filesystem.squashfs
mv filesystem.squashfs /path/to/backup/
mount squashfs/LiveOS/ext3fs.img ext3fs -o loop
@deviousway
deviousway / centos_static_ip.txt
Last active January 27, 2018 07:27
centos network innterface setup static ip
/etc/sysconfig/network-scripts/ifcfg-enp2s0
IPV6INIT=no
BOOTPROTO=static
DEVICE=enp2s0
ONBOOT=yes
UUID="ccea7d4f-855b-496e-945b-da7fe543b725"
IPADDR=104.193.150.10
NETMASK=255.255.255.248
GATEWAY=104.193.150.9
@deviousway
deviousway / lsof.txt
Created January 23, 2018 21:35
lsof command to find all things listening on ports
lsof -Pnl +M -i4 | grep LISTEN
@deviousway
deviousway / Cat_File_Without_Comments.txt
Created December 18, 2017 18:36
Cat a File, Without the Comments
cat $filename | egrep -v "^#"
or
cat $filename | egrep -v "(^#.*|^$)"
@deviousway
deviousway / exim_clean_queue
Created November 30, 2017 12:27
Exim Remove All messages From the Mail Queue
exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash
or
exim -bp | exiqgrep -i | xargs exim -Mrm
sed -i 's/oldstring/new string/g'
@deviousway
deviousway / ffmpeg_mkv_to_mp4.txt
Last active November 8, 2017 11:37
ffmpeg mkv to mp4
for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done
@deviousway
deviousway / ffmpeg_swap_chanel.txt
Last active November 8, 2017 11:36
ffmpeg swap audio channel in video
ffmpeg -i $input -map_channel 0.1.1 -strict -2 $output
@deviousway
deviousway / plesk.txt
Last active November 8, 2017 11:36
Plesk
#Show email passwords.
/usr/local/psa/admin/sbin/mail_auth_view