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
➜ ~ launchctl list | grep docker | |
- 0 com.docker.helper | |
1990 0 application.com.docker.docker.715810.716504 | |
➜ ~ launchctl stop application.com.docker.docker.715810.716504 && launchctl start application.com.docker.docker.715810.716504 |
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/bash | |
scriptSource="${BASH_SOURCE[0]}" | |
while [[ -h "${scriptSource}" ]]; do # resolve ${scriptSource} until the file is no longer a symlink | |
sourceDir="$( cd -P "$( dirname "${scriptSource}" )" >/dev/null 2>&1 && pwd )" | |
scriptSource="$(readlink "${scriptSource}")" | |
[[ ${scriptSource} != /* ]] && scriptSource="${sourceDir}/${scriptSource}" # if ${scriptSource} was a relative symlink, we need to resolve it relative to the path where the symlink file w$ | |
done |
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.8' | |
services: | |
cadvisor: | |
image: gcr.io/cadvisor/cadvisor:latest | |
restart: always | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:ro | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro |
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
cache: | |
- key: | |
files: | |
- Gemfile.lock | |
paths: | |
- vendor/ruby | |
- key: | |
files: | |
- yarn.lock | |
paths: |
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
# GCP | |
Host bastion-projectname | |
ProxyCommand sh -c "gcloud compute ssh --tunnel-through-iap --project PROJECTNAME --zone ZONENAME %h --command='nc 0.0.0.0 22'" | |
StrictHostKeyChecking no | |
#UserKnownHostsFile /dev/null | |
ForwardAgent no | |
ForwardX11 no | |
# Uncomment option below to use bastion as SSH proxy only | |
#RequestTTY no | |
ExitOnForwardFailure yes |
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
// https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html | |
data "aws_iam_policy_document" "BillingViewAccess" { | |
statement { | |
actions = [ | |
"aws-portal:ViewAccount", | |
"aws-portal:ViewBilling", | |
"aws-portal:ViewPaymentMethods", | |
"aws-portal:ViewUsage", | |
"budgets:ViewBudget", | |
"ce:DescribeNotificationSubscription", |
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 requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.util.retry import Retry | |
retry_strategy = Retry( | |
total=3, | |
status_forcelist=[429, 500, 502, 503, 504], | |
method_whitelist=["HEAD", "GET", "OPTIONS"] | |
) | |
adapter = HTTPAdapter(max_retries=retry_strategy) | |
http = requests.Session() |
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
Собираем helm-чарт в gitlab-ci и пушим в docker registry | |
Используем экспериментальную фичу с oci-registry в которую научился хелм. Это значит что мы можем чарты теперь просто пушить рядом с контейнерами докера с таким же именованием и тегированием. | |
deploy_helm: | |
stage: deploy | |
image: docker:18-dind | |
services: | |
- docker:18-dind | |
environment: { name: production } | |
tags: [docker] | |
only: |
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/bash | |
#set -x | |
###Script for dlink wifi camera to download files from internal SD card (probably very depended on one particular software version of the cam) | |
###Latest very talkative version with handling of interrupted transfers | |
username="admin" | |
password="password" | |
cred="$username:$password" |
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
terraform { | |
backend "s3" { | |
bucket = "specify" | |
key = "terraform/project/prod/terraform.tfstate" | |
profile = "specify" | |
region = "eu-central-1" | |
endpoint = "s3.eu-central-1.amazonaws.com" | |
} | |
} |