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
| //add this to your bookmarks. The default vhost in RabbitMq is "/", | |
| // so you should have as virtualhost %2F, but due to chrome escape it, i used %252f | |
| //i assume you're in the management site (http://www.rabbitmq.com/management.html) | |
| javascript: | |
| vhost="%252f"; | |
| var purge = function(name) { | |
| $.ajax({ | |
| url:'api/queues/' + vhost + "/" + name + '/contents/', | |
| type: 'DELETE', | |
| success:function(data) { |
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
| def require(package): | |
| with settings(hide('stdout'), warn_only=True): | |
| out = run('dpkg -s %s' %package) | |
| if not out.succeeded: | |
| print "The package is not installed. Installing \n" | |
| sudo("apt-get install %s" %package) | |
| else: | |
| print "The package is installed.\n" | |
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
| var truncate = function(msg, len, suffix) { | |
| var truncated = msg.substring(0, len); | |
| if (msg.length > len) { | |
| truncated += suffix; | |
| } | |
| return truncated; | |
| } |
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 org.xml.sax.SAXException; | |
| @Component("duplicatedChannels") | |
| public class DuplicatedChannels { | |
| private final Log logger = LogFactory.getLog(this.getClass()); | |
| @Autowired | |
| private ApplicationContext appContext; | |
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
| %% | |
| %% | |
| %% This plugin is based on rabbitmq-recent-history-exchange | |
| %% from Alvaro Videla https://github.com/videlalvaro/rabbitmq-recent-history-exchange | |
| %% | |
| %% This is plugin has been developed by ShuttleCloud. | |
| %% | |
| %% This exchange gives you the possibility to set throttling to any | |
| %% exchange. This exchange receives a message and after a time it's delivered | |
| %% to the final exchange. It works as an intermediary |
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
| //add this to your bookmarks. The default vhost in RabbitMq is "/", | |
| //so you should have as virtualhost %2F, but due to chrome escape it, i used %252f | |
| //i assume you're in the management site (http://www.rabbitmq.com/management.html) | |
| javascript: | |
| vhost="%252f"; | |
| var delete_queues = function(name) { | |
| $.ajax({ | |
| url:'api/queues/' +vhost+ '/' + name, | |
| type: 'DELETE', | |
| success:function(data) { |
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 sys | |
| import time as timer | |
| import urllib | |
| from datetime import datetime, time | |
| import signal | |
| name = '' | |
| def record(): | |
| url_stream = urllib.urlopen("http://vaughanradio.streaming-pro.com:8012/;stream.nsv") | |
| f = open("%s_%s.mp3" %(name, datetime.now().strftime("%y-%m-%d")),"wb"); | |
| print ('Recording...') |
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 logging | |
| import pika | |
| from threading import Timer | |
| BATCH_SIZE = 100 | |
| LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
| '-35s %(lineno) -5d: %(message)s') | |
| LOGGER = logging.getLogger(__name__) | |
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 logging | |
| import sys | |
| import os | |
| import settings | |
| import pika | |
| import re | |
| from threading import Timer | |
| LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
| '-35s %(lineno) -5d: %(message)s') |
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 logging | |
| import pika | |
| LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
| '-35s %(lineno) -5d: %(message)s') | |
| LOGGER = logging.getLogger(__name__) | |
| class ExampleConsumer(object): | |
| """This is an example consumer that will handle unexpected interactions |