- Based on a fixed percentage of memory and CPU reservation.
- Scaling on both cpu and memory metrics can cause the metrics to fight with each other where it'll scale out then back in and repeat.
- If you're scaling threshold is at 80% memory, current reservation utilization is at 79% and you deploy a container that requires 25% memory, It will fail to launch.
- ASGs are not container aware.
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
<template name="bool:default" value="/** * @var bool * @ORM\Column(type="boolean", options={"default": $default$}) */ private bool $$$name$ = $default$; $END$ public function is$method$(): bool { return $this->$name$; } public function set$method$(bool $$$name$): void { $this->$name$ = $$$name$; }" description="boolean column" toReformat="false" toShortenFQNames="true"> | |
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="default" expression="enum("false", "true")" defaultValue="" alwaysStopAt="true" /> | |
<variable name="method" expression="capitalize(name)" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="PHP Class Member" value="true" /> | |
</context> | |
</template> | |
<template name="bool:nullable" value="/** * @var bool|null * @ORM\Column(type="boolean", nullable=true) */ private ?bool $$$name$ = nul |
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
resource "aws_alb_listener_rule" "http_80" { | |
count = local.lb ? 1 : 0 | |
listener_arn = data.aws_alb_listener.http_80.arn | |
action { | |
type = "forward" | |
target_group_arn = aws_alb_target_group.http_80[0].arn | |
} | |
condition { | |
host_header { | |
values = [local.host_name] |
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
See Microsoft's WSL install guide for windows 10 for details.
Work-in-progress - command line only install:
- Open Powershell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Open Windows App Store
- Search for "Ubuntu" and install Ubuntu 18.04
(work in progress - command line install steps):
Deploy updates to aws ecs services based on github commits. Posts deploy notifications to slack.
Assumptions:
- Task definitions map 1:1 with services, and they have the same name.
- Code is stored on github
- You want to deploy the latest commit in a branch
- Docker images are tagged with commit SHA
- Docker images are stored on AWS ECR
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
# use ImageMagick convert | |
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
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
// services.yml | |
catalog.kernel.request_event_listener: | |
class: App\CoreBundle\EventListener\KernelBootDatabaseSwitchListener | |
arguments: [@request, @doctrine.dbal.default_connection, @logger] | |
scope: request | |
tags: | |
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest } | |
// KernelContextListener | |
/** |
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
<?php | |
namespace AppBundle\Doctrine; | |
use AppBundle\Entity\Organisation; | |
use Doctrine\DBAL\Connection; | |
use Acme\Common\DatabaseNameResolver; | |
class DataConnectionWrapper extends Connection | |
{ | |
/** |
NewerOlder