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
ZOO_LOG4J_PROP="INFO,ROLLINGFILE" | |
ZOO_LOG_DIR="/var/log/zookeeper/" |
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
$client = new-object System.Net.WebClient | |
$client.DownloadFile( "http://dl.dropbox.com/u/5943991/busybox-w32/busybox.exe", "C:/windows/busybox.exe" ) | |
.\busybox.exe --help |
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
echo Enabling firewall rule... | |
netsh advfirewall firewall add rule name="SSHd" dir=in action=allow protocol=TCP localport=22 | |
echo Downloading cygwin installer... | |
$client = new-object System.Net.WebClient | |
$client.DownloadFile( "http://www.cygwin.com/setup.exe", "c:\windows\temp\setup.exe" ) | |
.\Windows\Temp\setup.exe |
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 install libyajl-dev libopenwsman-dev gcc make pkg-config \ | |
libxml2-dev libgnutls-dev libdevmapper-dev libcurl4-openssl-dev python-dev \ | |
libxen-dev | |
wget http://libvirt.org/sources/libvirt-1.0.0.tar.gz | |
tar xvzf libvirt-1.0.0.tar.gz | |
cd libvirt-1.0.0 | |
./configure --prefix=/usr --localstatedir=/var \ | |
--sysconfdir=/etc --with-esx=yes --with-hyperv=yes --with-xen=yes | |
make | |
sudo make install |
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
# Monitoring processes I/O | |
dstat -s --top-io --top-bio | |
iotop |
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
#Find a (wired) Raspberry Pi on the network | |
nmap -sn 192.168.1.0/24 > /dev/null; cat /proc/net/arp | grep b8:27 | awk '{print $1}' | |
# Symmetric encrypt with Blowfish | |
openssl enc -bf-cbc -salt -in myfile.txt -out myfile.enc | |
# Symmetric decrypt with Blowfish | |
openssl enc -d -bf-cbc -in myfile.enc -out myfile.txt | |
# Almost invisible shell | |
ssh -o UserKnownHostsFile=/dev/null -T user@host /bin/bash -i |
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 | |
# run as root | |
yum install -y vim git tcpdump yum-utils wget w3m strace lsof curl sudo screen | |
yum localinstall -y http://ftp.cica.es/epel/6/i386/epel-release-6-8.noarch.rpm | |
yum install -y bash-completion htop ccze mtr nmap tmux |
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
setxkbmap -layout us -variant altgr-intl -option -option lv3:ralt_switch | |
xmodmap -e "keycode 47 = semicolon colon semicolon colon dead_grave dead_grave" |
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
# The usage quotas for the tenant are updated after deleting or creating a new instance | |
read -s -p "MySQL Password: " pw | |
vm_uuid=$1 | |
mysql -D nova -p$pw -e "update instances set deleted='1', vm_state='deleted',deleted_at='now()' where uuid='$vm_uuid' limit 1;" | |
sleep 1 | |
mysql -D nova -p$pw -e "delete from instance_faults where instance_faults.instance_uuid = '$vm_uuid';" | |
mysql -D nova -p$pw -e "delete from instance_id_mappings where instance_id_mappings.uuid = '$vm_uuid';" | |
mysql -D nova -p$pw -e "delete from instance_info_caches where instance_info_caches.instance_uuid = '$vm_uuid';" | |
mysql -D nova -p$pw -e "delete from instance_system_metadata where instance_system_metadata.instance_uuid = '$vm_uuid';" | |
mysql -D nova -p$pw -e "delete from security_group_instance_association where security_group_instance_association.instance_uuid = '$vm_uuid';" |
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
# Clean all unassociated FIPs | |
nova floating-ip-list | grep "| -" | awk '{ print $2}' | xargs -L1 nova floating-ip-delete | |
OlderNewer