wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_5_1/rabbitmq-server_3.5.1-1_all.deb
sudo dpkg -i rabbitmq-server_3.5.1-1_all.deb
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 | |
| #Removes files older than 14 days from directory | |
| #allows to set autoclean up some temp directory | |
| find ~/Downloads/* -mtime +14 -exec rm -rf {} \; | |
| #synchronize dirs with remote server | |
| rsync -avz --progress user@server:/some/path ./some_local_dir |
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 | |
| checkSizeOver() { | |
| typeset -i LFSB LFSM LOG_SIZE=10 | |
| LF=$1 | |
| LOG_SIZE=$2 | |
| LFSB=$(stat -c "%s" $LF) | |
| # This is bytes - turn into MB, base 2} | |
| LFSM=${LFSB}/1048576 | |
| # This is bytes - turn into MB, base 2 | |
| if [ $LFSM -gt $LOG_SIZE ] |
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
| # Given | |
| Given I am on [the] homepage | |
| Given I am on "url" | |
| # When | |
| When I go to [the] homepage | |
| When I go to "url" | |
| When I reload the page |
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 | |
| user='user' | |
| pass='pass' | |
| host='host' | |
| cmd="mysql -u $user -p$pass -h $host -e 'SHOW GLOBAL STATUS;'" | |
| remoteCall='uptime' | |
| if ! /bin/bash -c "$cmd"; | |
| then |
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
| class CallbackExecutor | |
| { | |
| protected $callback; | |
| public function __call($method, $args) | |
| { | |
| if(is_callable(array($this, $method))) { | |
| return call_user_func_array($this->$method, $args); | |
| } | |
| // else throw exception |
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 "deploy Was started" | |
| hostname -f; | |
| uptime; | |
| for package in $@ | |
| do | |
| echo $package | |
| if [ "$(rpm -qa | grep -E "^$package")" != "" ] |
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
| <?php | |
| namespace Jkanclerz\DemoBundle\Payment; | |
| use Symfony\Component\HttpFoundation\Request; | |
| class PaymentHandler | |
| { | |
| const TRANSACTION_OK = 'OK'; | |
| const TRANSACTION_ERROR = 'ERROR'; |
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
| public function getCacheDir() | |
| { | |
| if ($this->isVagrantEnvironment()) { | |
| return '/dev/shm/project/cache/'.$this->environment; | |
| } | |
| return parent::getCacheDir(); | |
| } | |
| public function getLogDir() |