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 boto3 | |
import copy | |
table = "${destTableName}" | |
def handler(event, context): | |
// do some assume role stuff into another account here | |
// client = boto3.client('iam') | |
// response = client.assume_role( | |
// RoleArn=arn, | |
// RoleSessionName=username, | |
// DurationSeconds=timeout |
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
--- | |
- name: get hosted zone info | |
route53_facts: | |
query: hosted_zone | |
register: zone_info | |
- name: get zone id | |
set_fact: | |
zone_id: "{{ zone.Id | regex_replace('/hostedzone/', '') }}" | |
when: zone.Name == route53_zone + '.' |
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
library ddd.account; | |
import 'account_event.dart'; | |
import 'package:akka/akka.dart' show TypedActor; | |
class _AccountState { | |
static const String _UNKNOWN_ACCOUNT = 'unknown'; | |
final String accountNumber; |
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
if (String.prototype.isEmpty == undefined) { | |
Object.defineProperty(String.prototype, 'isEmpty', { | |
get: function() { return this.trim() == ''; } | |
}); | |
} | |
if (String.prototype.isNotEmpty == undefined) { | |
Object.defineProperty(String.prototype, 'isNotEmpty', { | |
get: function() { return this.trim() != ''; } | |
}); |
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
<?php declare(strict_types=1); | |
namespace proj\http; | |
interface ApplicationInterface { | |
public function run(); | |
public function use(callable $aMiddleware); | |
public function respondTo(string $anHttpMethod, string $aUriPath, callable $aResponder); |
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
<?php declare(strict_types=1); | |
/** | |
* @method static self AUTO() | |
* @method static self ASK() | |
* @method static self SCHEDULE() | |
* @method static self IGNORE() | |
*/ | |
final class UpdateResponseType | |
{ |
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
<?php declare(strict_types=1); | |
namespace {owner}\{project}\environment; | |
final class ApplicationConfig | |
{ | |
public const ENV_DEVELOPMENT = 'development'; | |
public const ENV_TEST = 'test'; | |
public const ENV_STAGING = 'staging'; | |
public const ENV_PRODUCITON = 'production'; |
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
"use strict" | |
var Util = Object.create({}, { | |
isDefined: { value: function(aValue) { | |
return !this.isUndefined(aValue); | |
}}, | |
isUndefined: { value: function(aValue) { | |
return (aValue === undefined); | |
}}, | |
isA: { value: function(aValue, aType) { |
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
<?php declare(strict_types=1); | |
class CallbackIterator implements Iterator | |
{ | |
private $index = 0; | |
private $maxIterations = 0; | |
private $callback; | |
public function __construct(int $anIterationCount, callable $aCallback) | |
{ |
NewerOlder