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 iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 172.17.20.158:3000 |
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
| import platform | |
| if platform.system()=='Darwin': | |
| print 'Mac' |
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 sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install virtualbox-4.3 dkms | |
| # There are a few extra features, such as USB support, which are closed-source and distributed in separate extension packs. | |
| wget http://download.virtualbox.org/virtualbox/4.3.10/Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack | |
| sudo VBoxManage list extpacks | |
| sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.10-93012.vbox-extpack | |
| sudo VBoxManage list extpacks | |
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
| tar xf archive.tar -C /target/directory --strip-components=1 | |
| #Note that if your tarball already contains a directory name you want to change, adding --strip-components=1 is needed. |
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 ruby | |
| sudo curl https://hub.github.com/standalone -Lo /usr/bin/hub | |
| sudo chmod 755 /usr/bin/hub | |
| alias git=hub |
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
| # Install newrelic server monitoring | |
| # Add newrelic repository | |
| - apt_repository: repo='deb http://apt.newrelic.com/debian/ newrelic non-free' state=present | |
| # Trust the New Relic GPG key. | |
| - apt_key: url=https://download.newrelic.com/548C16BF.gpg state=present | |
| # Update and install apt packages | |
| - name: Run apt-get update | |
| apt: update_cache=yes |
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 -f "/home/as/.ssh/known_hosts" -R 10.10.6.193 |
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
| wget --no-check-certificate http://www.teamviewer.com/download/teamviewer_linux.deb | |
| sudo dpkg --add-architecture i386 && sudo apt-get update && sudo dpkg -i teamviewer_linux.deb && sudo apt-get install -f -y |
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
| from amqplib import client_0_8 as amqp | |
| conn = amqp.Connection(host="mq.example.com:5672", userid="admin", password="p@ssw0rd!", virtual_host="/", insist=False) | |
| conn = conn.channel() | |
| queues = ['celery'] | |
| for q in queues: | |
| if q: | |
| #print 'deleting %s' % q |
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 | |
| # install erlang | |
| sudo apt-get install erlang -y | |
| sudo apt-get install erlang-nox -y | |
| # get deb package | |
| echo deb http://www.rabbitmq.com/debian/ testing main | sudo tee /etc/apt/sources.list | |
| # add key |