Skip to content

Instantly share code, notes, and snippets.

Petr Ruzicka ruzickap

Block or report user

Report or block ruzickap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ruzickap
ruzickap / enclosure_get_info.sh
Last active Jun 5, 2018
Get information from HP C7000 enclosure.
View enclosure_get_info.sh
#!/bin/bash -x
IP="10.29.33.14"
USER="admin"
PASSWORD="admin"
DESTINATION="./log_directory/"
WGET="wget --no-proxy --user=$USER --password=$PASSWORD --no-check-certificate"
cat > /tmp/hpoa.xml << EOF
<?xml version="1.0"?>
@ruzickap
ruzickap / win7-user.bat
Last active Dec 27, 2015
win7 customization file. Run right after you first log in with administrator rights.
View win7-user.bat
:: Tested on Windows 7
echo on
rem for /f "tokens=3" %%i in ('netsh interface ip show addresses "Local Area Connection" ^|findstr IP.Address') do set IP=%%i
rem for /f "tokens=2 delims=. " %%j in ('nslookup %IP% ^|find "Name:"') do set HOSTNAME=%%j
@echo.
@echo Enable Administrator
@ruzickap
ruzickap / win7-admin.bat
Last active Jul 4, 2018
win7 customization file. Run right after you first log in as administrator.
View win7-admin.bat
:: Tested on Windows 7
@echo.
@echo Test connection settings
powershell -command "$client = new-object System.Net.WebClient; $client.DownloadFile('http://www.google.com', 'c:\del')"
if %ERRORLEVEL% NEQ 0 (
@echo Can not download files form Internet !!!
pause
exit
@ruzickap
ruzickap / create_autostart_iso.sh
Last active Dec 27, 2015
Create iso containing VirtIO drivers and autostart script.
View create_autostart_iso.sh
#!/bin/bash -x
URL="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-65.iso"
ISO=`basename $URL`
sudo rm autostart.iso
wget --continue $URL
sudo mount -o loop ./$ISO /mnt/iso
@ruzickap
ruzickap / nfs_hp-ssst.sh
Last active Dec 29, 2015
NFS and HP SmartStart Scripting Toolkit installation
View nfs_hp-ssst.sh
yum install -y nfs-utils rpcbind
chkconfig nfs on
mkdir -p /data/hp/
chown -R nfsnobody:nfsnobody /data
cat > /etc/exports << EOF
/data 0.0.0.0/0.0.0.0(ro,no_root_squash,no_subtree_check,async,crossmnt,fsid=0)
/data/hp/ss-scripting-toolkit-linux 0.0.0.0/0.0.0.0(rw,no_root_squash,no_subtree_check,async,crossmnt)
View cobbler_installation_sstk.sh
# Install EPEL
MAJOR_RELEASE=`sed 's/.* \([0-9]*\)\.[0-9] .*/\1/' /etc/redhat-release`
cd /tmp/
lftp -e "mget /pub/linux/fedora/epel/6/x86_64/epel-release*.noarch.rpm; quit;" http://ftp.fi.muni.cz/
rpm -Uvh ./epel*${MAJOR_RELEASE}*.noarch.rpm
# Install Cobbler
yum install -y cobbler-web fence-agents git hardlink ipmitool dhcp
sed -i.orig 's/module = authn_denyall/module = authn_configfile/' /etc/cobbler/modules.conf
View cobbler_installation_hpspp.sh
# Install EPEL
MAJOR_RELEASE=`sed 's/.* \([0-9]*\)\.[0-9] .*/\1/' /etc/redhat-release`
cd /tmp/
lftp -e "mget /pub/linux/fedora/epel/6/x86_64/epel-release*.noarch.rpm; quit;" http://ftp.fi.muni.cz/
rpm -Uvh ./epel*${MAJOR_RELEASE}*.noarch.rpm
# Install Cobbler
yum install -y cobbler-web fence-agents git hardlink ipmitool dhcp
sed -i.orig 's/module = authn_denyall/module = authn_configfile/' /etc/cobbler/modules.conf
@ruzickap
ruzickap / nfs_hp-hpspp.sh
Last active Jan 1, 2016
NFS and HP Service Pack for ProLiant installation
View nfs_hp-hpspp.sh
yum install -y nfs-utils rpcbind
chkconfig nfs on
mkdir -p /data/hp/HP_Service_Pack_for_Proliant
chown -R nfsnobody:nfsnobody /data
cat > /etc/exports << EOF
/data 0.0.0.0/0.0.0.0(ro,no_root_squash,no_subtree_check,async,crossmnt,fsid=0)
EOF
@ruzickap
ruzickap / openwrt_ddns.sh
Created Apr 6, 2014
OpenWrt DDNS (duckdns.org) configuration
View openwrt_ddns.sh
uci set ddns.myddns.enabled=1
uci set ddns.myddns.service_name=duckdns.org
uci set ddns.myddns.domain=gate
uci set ddns.myddns.username=NA
uci set ddns.myddns.password=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
uci set ddns.myddns.ip_source=network
uci set ddns.myddns.ip_network=wan
uci set ddns.myddns.force_interval=72
uci set ddns.myddns.force_unit=hours
uci set ddns.myddns.check_interval=10
@ruzickap
ruzickap / openwrt_luci_statistics.sh
Last active Mar 26, 2017
OpenWrt LuCI Statistics additions
View openwrt_luci_statistics.sh
opkg install collectd-mod-conntrack collectd-mod-cpu collectd-mod-df collectd-mod-disk collectd-mod-dns collectd-mod-irq collectd-mod-memory collectd-mod-ping collectd-mod-processes collectd-mod-syslog collectd-mod-tcpconns collectd-mod-uptime
mkdir -p /etc/collectd/conf.d
#Make the stats permanent
uci set luci_statistics.collectd_rrdtool.DataDir=/etc/collectd
uci set luci_statistics.collectd_ping.enable=1
uci set luci_statistics.collectd_ping.Hosts=www.google.com
uci set luci_statistics.collectd_df.enable=1
uci set luci_statistics.collectd_df.Devices=/dev/mmcblk0p1
uci set luci_statistics.collectd_df.MountPoints=/data
You can’t perform that action at this time.