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
package com.schibsted.notification.queueconsumer.config; | |
import com.amazonaws.regions.Region; | |
import com.amazonaws.regions.Regions; | |
import com.amazonaws.services.kinesis.AmazonKinesisClient; | |
import com.amazonaws.services.sns.AmazonSNSClient; | |
import com.amazonaws.services.sqs.AmazonSQSAsync; | |
import com.amazonaws.services.sqs.AmazonSQSAsyncClient; | |
import com.amazonaws.services.sqs.buffered.AmazonSQSBufferedAsyncClient; | |
import com.amazonaws.services.sqs.buffered.QueueBufferConfig; |
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
import org.apache.log4j.Logger; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.autoconfigure.web.ErrorController; | |
import org.springframework.boot.autoconfigure.web.ErrorAttributes; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
import org.springframework.web.context.request.RequestAttributes; | |
import org.springframework.web.context.request.ServletRequestAttributes; |
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
import sys | |
import logging | |
from stompy.stomp import Stomp, ConnectionError, ConnectionTimeoutError | |
class QueueConsumer(object): | |
""" Queue consumer | |
""" | |
def __init__(self, host='localhost', port=61613): |
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
import xmlrpclib | |
class ProcessStatus(object): | |
RUNNING = 'RUNNING' | |
STOPPED = 'STOPPED' | |
FATAL = 'FATAL' | |
RESTARTING = 'RESTARTING' | |
SHUTDOWN = 'SHUTDOWN' |
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
import xmlrpclib | |
class SupervisorClient(object): | |
""" Supervisor client to work with remote supervisor | |
""" | |
def __init__(self, host='localhost', port=9001): | |
self.server = xmlrpclib.Server('http://{}:{}/RPC2'.format(host, port)) |
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
#user nobody; | |
worker_processes 1; | |
#pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
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
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified_re = re.compile(r'^(\s[AM]+)\s+(?P<name>.*\.py)') | |
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
#!/usr/bin/env python | |
import os | |
import re | |
import subprocess | |
import sys | |
modified_re = re.compile('^[AM]+\s+(?P<name>.*\.py)', re.MULTILINE) | |
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
# aliases | |
alias cd..="cd .." | |
alias l="ls -al" | |
alias lp="ls -p" | |
alias h=history | |
# Mongo | |
export MONGO_PATH=/usr/local/mongodb | |
export PATH=$PATH:$MONGO_PATH/bin |