This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Restore/Deploy an OVF backup/template | |
ovftool -ds=datastore -dm=thin -n=new-server /var/backup_files/esxi/ubuntu-template/ubuntu-template.ovf vi://[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcpdump -n -e -ttt -r /var/log/pflog |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HISTSIZE=100000 | |
HISTFILESIZE=100000 | |
HISTTIMEFORMAT='%F %T ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
vim-cmd vmsvc/getallvms | grep -i hostname | cut -d ' ' -f 1 | xargs vim-cmd vmsvc/get.guest | grep ipAddress | sed -n 1p | cut -d '"' -f 2 | |
# or | |
ssh esxi.example.com /bin/vim-cmd vmsvc/get.guest $(ssh esxi.example.com /bin/vim-cmd vmsvc/getallvms | grep -i hostname | cut -d ' ' -f 1) | grep ipAddress | sed -n 1p | cut -d '"' -f 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
> ~/.bash_history && history -c && exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "- - -" > /sys/class/scsi_host/host#/scan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get --purge remove landscape-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /path/to/moinmoin/ | |
moin --config-dir= --wiki-url=wiki.example.com export dump --target-dir=moin_export/ | |
tar -czf moin_export.tar.gz moin_export |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove --purge $(dpkg -l 'linux-image-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# cat out all the files' contents to a single file | |
for DIR in `ls /home/nowcast/FTP_root/au/`; do zcat /home/nowcast/FTP_root/au/$DIR/* >> file.txt; done; | |
# keep only uniq entries | |
sort file.txt | uniq >> final_file.txt | |
# print out the lat/long/timestamp in the required javascript syntax for the Google Maps HTML file | |
# cloud to ground | |
awk '$3 <= -38 && $3 >= -39 && $4 >= 146.5 && $4 <= 147.5 && $6 == 1 { print "add_markers(1," $3 "," $4 ",\x27" $1 " " $2 " - " $3 " " $4 "\x27,\x27" $1 " " $2 " - " $3 " " $4 "\x27,\x27/lightning-icon-Sparse-1.png\x27)"}' final_file.txt >> markers_cloud_to_ground.txt |