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 com.rackspace.monitoring.BaseLoggingThing | |
import org.springframework.retry.RetryCallback | |
import org.springframework.retry.RetryContext | |
import org.springframework.retry.policy.TimeoutRetryPolicy | |
import org.springframework.retry.support.RetryTemplate | |
class TimeoutRetryExample extends BaseLoggingThing { | |
RetryTemplate retryTemplate = new RetryTemplate() | |
CarRepository carRepository |
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
from bottle import Bottle, run, request, response, HTTPResponse | |
APP1 = Bottle() | |
@APP1.hook('before_request') | |
def before_request(): | |
print "APP 1 - Before Request {}".format(request.url) | |
@APP1.hook('after_request') | |
def after_request(): |
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
from bottle import Bottle, HTTPResponse | |
class CustomHttpException(BaseException): | |
def __init__(self, status_code, message): | |
self.status_code = status_code | |
self.message = message | |
APP1 = Bottle() | |
def access_status_correctly(callback): |
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
input { | |
stdin { } | |
file { | |
path => "/var/log/your_app/your_app.log" | |
start_position => beginning | |
codec => multiline { | |
'negate' => true | |
'pattern' => '^\d' | |
'what' => 'previous' | |
} |
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 json | |
import os | |
from optparse import OptionParser | |
import requests | |
import sys | |
import logging as log | |
__author__ = 'ravi' | |
API_URL = 'https://github.com/api/v3/repos/{}/{}/releases' |
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.charter.aesd.deviceactivation.middle.services | |
import rx.Observable | |
import rx.functions.Func1 | |
import spock.lang.Specification | |
/** | |
* Created by rhasija on 10/28/15. | |
*/ | |
class ObservableTest extends Specification { |
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.charter.aesd.deviceactivation.middle.rest; | |
import rx.Observable; | |
import java.util.Optional; | |
/** | |
* Created by rhasija on 10/28/15. | |
*/ | |
public class ObservableTest { |
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.charter.aesd.deviceactivation.edgeservice.rest; | |
import rx.Observable; | |
import rx.functions.Func1; | |
import java.util.Optional; | |
/** | |
* Created by rhasija on 10/28/15. | |
*/ |
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.charter.aesd.deviceactivation.edgeservice.rest; | |
import org.apache.commons.collections.CollectionUtils; | |
import rx.Observable; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
import static java.util.Arrays.asList; |
OlderNewer