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
FROM quay.io/coreos/clair:v2.1.2 | |
LABEL maintainer="AL-waleed Shihadeh <[email protected]>" | |
ENV BUILD_DEPS="gettext" \ | |
RUNTIME_DEPS="libintl" | |
COPY ./docker-entrypoint.sh / | |
ENTRYPOINT ["/docker-entrypoint.sh"] |
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
#!/bin/sh -e | |
/usr/local/bin/envsubst < /etc/clair/config.yaml.tpl > /etc/clair/config.yaml | |
case $1 in | |
clair) | |
/usr/bin/dumb-init -- /clair -config /etc/clair/config.yaml | |
;; |
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
# frozen_string_literal: true | |
class PriorityList | |
def initialize(list) | |
@mode = ENV.fetch('APPLICATION_MODE', 'ascending') | |
@list = list | |
end | |
def priority_list | |
case @mode |
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
# frozen_string_literal: true | |
describe PriorityList do | |
let(:list) { [1, 4, 6, 3, 7, 3, 0, 20, 3] } | |
describe '#priority_list' do | |
context 'ascending mode' do | |
before do | |
ENV['APPLICATION_MODE'] = 'ascending' | |
end |
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
# frozen_string_literal: true | |
describe PriorityList do | |
let(:list) { [1, 4, 6, 3, 7, 3, 0, 20, 3] } | |
describe '#priority_list' do | |
context 'ascending mode' do | |
before do | |
allow(ENV).to receive(:fetch).with('APPLICATION_MODE', 'ascending') | |
.and_return('ascending') |
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 boto3 | |
region = 'eu-central-1' | |
ec2 = boto3.client('ec2', region_name=region) | |
response = ec2.describe_instances(Filters=[ | |
{ | |
'Name': 'tag:Auto-Start', | |
'Values': [ | |
'true', | |
] | |
}, |
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_iam_policy" "stop_start_ec2_policy" { | |
name = "StopStartEC2Policy" | |
path = "/" | |
description = "IAM policy for stop and start EC2 from a lambda" | |
policy = <<EOF | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ |
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
gemfile: false | |
# Where to store hook plugins specific to a repository. These are loaded in | |
# addition to the default hooks Overcommit comes with. The location is relative | |
# to the root of the repository. | |
plugin_directory: '.git-hooks' | |
# Whether to hide hook output by default. This results in completely silent hook | |
# runs except in the case of warning or failure. | |
quiet: false |
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
version: '3.7' | |
networks: | |
portainer: | |
name: portainer | |
driver: overlay | |
attachable: true | |
services: | |
agent: |
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
dn: cn=developer,dc=shihadeh,dc=intern | |
changetype: add | |
objectclass: inetOrgPerson | |
cn: developer | |
givenname: developer | |
sn: Developer | |
displayname: Developer User | |
mail: [email protected] | |
userpassword: developer_pass |