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
ssh-keygen -t rsa | |
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys' |
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 update && sudo apt-get install --only-upgrade bash | |
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" |
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/sh | |
# | |
# This is a script to convert (by using `mutate` command of VirtualBox) | |
# a virtualbox image for using it with libvirt | |
# | |
wget http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box -O ubuntu-trusty-x64-vagrant.box | |
vagrant mutate ubuntu-trusty-x64-vagrant.box libvirt | |
vagrant box list | |
export VAGRANT_DEFAULT_PROVIDER=libvirt |
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
/etc/rc.local | |
iptables -F FORWARD | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.122.10:80 |
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
mysqldump -u root --all-databases | gzip -c > $(date +%Y-%m-%d)_name-all-databases.sql.gz |
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
ssh-add $HOME/.vagrant.d/insecure_private_key |
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
# Deny direct access to several files | |
RewriteCond %{REQUEST_URI} ^/typo3_src [OR] | |
RewriteCond %{REQUEST_URI} ^/composer.json [OR] | |
RewriteCond %{REQUEST_URI} ^/composer.lock [OR] | |
RewriteCond %{REQUEST_URI} ^/.gitignore [OR] | |
RewriteCond %{REQUEST_URI} ^/.gitattributes [OR] | |
RewriteCond %{REQUEST_URI} ^/phpci.yml | |
RewriteRule .* / [L,R=301] |
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
ssh://[email protected]:__YOUR-PORT__/path-to/repository.git |
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 -x | |
VM_NAME=_base_trusty64_openstack | |
VM_MEM=8192 | |
VM_VCPUS=4 | |
VM_DISK_ISO=/var/lib/libvirt/images/ubuntu-14.04.1-server-amd64.iso | |
VM_NETWORK="bridge=br-ext" | |
VM_PATH=/opt/vms/${VM_NAME} | |
VM_DISK=${VM_PATH}/${VM_NAME}_disk.qcow2 |
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
# http://libguestfs.org/virt-resize.1.html | |
virt-filesystems --long --parts --blkdevs -h -a /home/libvirt-images/cloud-01_default.img | |
# Name Type MBR Size Parent | |
# /dev/sda1 partition 83 40G /dev/sda | |
# /dev/sda device - 40G - | |
# truncate -s 128G cloud-01_default-resized.img | |
qemu-img create -f qcow2 -o preallocation=metadata cloud-01_default-resized.img 128G |
OlderNewer