DDP creation, verification & burn using Reaper, ddpinfo_ and ImgBurn_.
TLDR
| class OrderedDictSerializer(serializers.ListSerializer): | |
| """ | |
| django-rest-framework serializer that a list or queryset into an OrderedDict. | |
| """ | |
| def to_representation(self, data): | |
| """ | |
| OrderedDict of object instances -> OrderedDict of dicts of primitive datatypes. | |
| """ | |
| # Dealing with nested relationships, data can be a Manager, |
So, you're a developer testing lots of codes and you want to ensure that you don't accidentally send out email to people during testing.
However, you also want to actually view emails in a real email client, not a console.
This is how you can do it using Ubuntu and Exim ensuring that the email gets sent out through Google apps.
| import React from 'react' | |
| import {shouldComponentUpdate} from 'react-addons-pure-render-mixin' | |
| export default class extends React.Component { | |
| shouldComponentUpdate = shouldComponentUpdate | |
| static propTypes ={ | |
| disabled: React.PropTypes.bool, | |
| } | |
| } |
| /* | |
| Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod | |
| May contain errors where latitude and longitude are off. Use at own non-validated risk. | |
| */ | |
| SET NAMES utf8; | |
| SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
| DROP TABLE IF EXISTS postcodes_geo; |
| colorscheme:python-log | |
| cs_re_s:blue:[DEBUG|INFO|WARNING|CRITICAL|ERROR] ([a-z\.0-9\_]+): | |
| cs_re_s:white,magenta,bold:(\sDEBUG\s) | |
| cs_re:magenta:.*DEBUG.* | |
| cs_re_s:white,green,bold:(\sINFO\s) | |
| cs_re:green:.*INFO.* | |
| cs_re_s:white,yellow,bold:(\sWARNING\s) | |
| cs_re:yellow:.*WARNING.* | |
| cs_re_s:white,red,bold:(\sCRITICAL\s) | |
| cs_re:red:.*CRITICAL.* |
| from celery.signals import celeryd_init, after_setup_task_logger | |
| app = Celery('myapp') | |
| # ... | |
| # ... | |
| # ... | |
| @celeryd_init.connect | |
| def configure_workers(sender=None, conf=None, **kwargs): |
| [2015-03-04 09:15:15,852: INFO/MainProcess] Received task: meh.tasks.a[ac7bb67f-5cc2-4c38-8608-66bf7dbdd7c1] | |
| [2015-03-04 09:15:15,852: INFO/MainProcess] Received task: meh.tasks.a[d252459b-87d7-4ed5-a73d-af30eb748317] | |
| [2015-03-04 09:15:15,852: INFO/MainProcess] Received task: meh.tasks.a[9d628c31-2529-40e7-8e94-09a93351b5e5] | |
| [2015-03-04 09:15:15,853: INFO/MainProcess] Received task: meh.tasks.a[a07b2dff-089b-40cb-8f2a-c17011296db3] | |
| [2015-03-04 09:15:15,854: WARNING/Worker-8] ~~~A~~~ | |
| [2015-03-04 09:15:15,854: WARNING/Worker-7] ~~~A~~~ | |
| [2015-03-04 09:15:15,854: WARNING/Worker-4] ~~~A~~~ | |
| [2015-03-04 09:15:15,854: WARNING/Worker-8] 3 | |
| [2015-03-04 09:15:15,854: WARNING/Worker-7] 2 | |
| [2015-03-04 09:15:15,854: WARNING/Worker-4] 1 |
It appears that if you have a require with sls: foo and foo.sls itself only has include: statements the requirement fails.
When the command salt \* state.highstate test=True the following is output;
example.com:
----------
ID: eggs
Function: cmd.run
Name: echo "I should be required..."