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
| package main | |
| import ( | |
| "flag" | |
| "io" | |
| "log" | |
| "net" | |
| "os" | |
| "os/signal" | |
| "runtime/pprof" |
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
| .formRow { | |
| .crearfix(); | |
| } | |
| is compiled to: | |
| .formRow { | |
| *zoom: 1; | |
| } | |
| .formRow:before, |
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 LoggingMixin(object): | |
| def dispatch(self, request_type, request, **kwargs): | |
| logger.debug( | |
| '%s %s %s' % | |
| (request.method, request.get_full_path(), request.raw_post_data)) | |
| try: | |
| response = super(LoggingMixin, self).dispatch( | |
| request_type, request, **kwargs) | |
| except (BadRequest, fields.ApiFieldError), e: |
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 | |
| from django.core.management.base import BaseCommand | |
| from celery.task.control import ping | |
| class Command(BaseCommand): | |
| def ok(self, message): | |
| self.stdout.write('OK: %s' % message) | |
| sys.exit(0) |
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
| package main | |
| import ( | |
| "bytes" | |
| "flag" | |
| "image" | |
| "image/jpeg" | |
| _ "image/png" | |
| "os" | |
| ) |
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
| #!/usr/bin/env python | |
| import sys | |
| import socket | |
| import xmlrpclib | |
| import argparse | |
| def supervisord_processes(address): | |
| try: |
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 operator | |
| from django.db.models.expressions import F, ExpressionNode | |
| EXPRESSION_NODE_CALLBACKS = { | |
| ExpressionNode.ADD: operator.add, | |
| ExpressionNode.SUB: operator.sub, | |
| ExpressionNode.MUL: operator.mul, | |
| ExpressionNode.DIV: operator.div, |
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
| CELERYD_HIJACK_ROOT_LOGGER = False | |
| def setup_task_logger(logger=None, **kwargs): | |
| logger.propagate = 1 | |
| from celery import signals | |
| signals.setup_logging.connect(lambda **kwargs: True) | |
| signals.after_setup_task_logger.connect(setup_task_logger) |
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
| package main | |
| import ( | |
| "os" | |
| "fmt" | |
| "websocket" | |
| ) | |
| const ( | |
| NumProcs = 5 |
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
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "http" | |
| "websocket" | |
| ) | |
| type subscription struct { |