This file contains 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
docker stop upstream1 | |
docker stop upstream2 | |
docker rm upstream1 | |
docker rm upstream2 | |
docker run -d -p 5673:5672 -p 8081:15672 -h upstream1 --name upstream1 -e RABBITMQ_ERLANG_COOKIE='SJBDYCLARUGZFQFCDQQZ' rabbitmq:3-management | |
docker run -d -p 5674:5672 -p 8082:15672 -h upstream2 --name upstream2 -e RABBITMQ_ERLANG_COOKIE='SJBDYCLARUGZFQFCDQQZ' rabbitmq:3-management | |
docker exec upstream2 rabbitmqctl stop_app | |
docker exec upstream2 rabbitmqctl join_cluster rabbit@upstream1 |
This file contains 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
docker run -d -p 5673:5672 -p 15673:15672 -h upstream1 --name upstream1 bijukunjummen/rabbitmq-server | |
docker run -d -p 5674:5672 -p 15674:15672 -h upstream2 --name upstream2 --link upstream1:upstream2 bijukunjummen/rabbitmq-server | |
docker exec upstream2 rabbitmqctl stop_app | |
docker exec upstream2 rabbitmqctl join_cluster rabbit@upstream1 | |
docker exec upstream2 rabbitmqctl start_app | |
# See other gist for haproxy config. ssh to docker and create ~/haproxy.cfg with content of gist. |
This file contains 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
global | |
log 127.0.0.1 local1 | |
maxconn 4096 | |
#chroot /usr/share/haproxy | |
uid 99 | |
gid 99 | |
#debug | |
#quiet | |
defaults |
This file contains 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
// bah.js | |
module.exports.bah = function(){ | |
function ponies(){ | |
return "hai"; | |
} | |
}; |
This file contains 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 static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disableMultiviews = false) | |
{ | |
$tab = array('ErrorDocument' => array(), 'RewriteEngine' => array(), 'RewriteRule' => array()); | |
$multilang = (Language::countActiveLanguages() > 1); | |
// ErrorDocument | |
$tab['ErrorDocument']['comment'] = '# Catch 404 errors'; | |
$tab['ErrorDocument']['content'] = '404 '.__PS_BASE_URI__.'404.php'; |
This file contains 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
# Send SMS messages using Raspberry Pi. | |
# Using gammu and Huawei E220 | |
# Prepare SD card with wheezy. | |
# Login / complete rasp-config / reboot / login | |
# Set vimrc to prevent annoying ADBC arrow keys | |
cp /etc/vim/vimrc ~/.vimrc |
This file contains 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
.background-image-retina(@file, @type, @width, @height) { | |
background-image: url("@{file}.@{type}"); | |
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
& { | |
background-image: url("@{file}@2x.@{type}"); | |
-webkit-background-size: @width @height; | |
} | |
} | |
} |
This file contains 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 http://prestashop.googlecode.com/files/prestashop_1.4.8.2.zip | |
unzip prestashop_1.4.8.2.zip | |
rm -rf css/ | |
rm -rf favicon.ico | |
rm -rf img/ | |
rm -rf index.html | |
rm -rf picture_library/ | |
rm -rf prestashop_1.4.8.2.zip | |
rm -rf test/ |
This file contains 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 | |
/** | |
* -------------------------------------------------------------------- | |
* @authour: Damon Skelhorn <[email protected]> Twitter: @damonsk; | |
* @date: 26/04/2012 | |
* -------------------------------------------------------------------- | |
* | |
* Usage: | |
* | |
* ClassController::includeClass('MyClass'); |