Skip to content

Instantly share code, notes, and snippets.

Avatar
🪄
Evanesco! 🪄

Maksim Skutin mskutin

🪄
Evanesco! 🪄
View GitHub Profile
View week15.md
@mskutin
mskutin / renew-gpgkey.md
Created Aug 11, 2020 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key
View renew-gpgkey.md

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

View ansible.cfg
# config file for ansible -- https://ansible.com/
# ===============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
View resume.json
{
"basics": {
"name": "Maksim Skutin",
"label": "DevOps Engineer",
"picture": "https://en.gravatar.com/userimage/96649416/baa527120c21fdfd266f9f6c54934068.jpg?size=1200",
"email": "meskutin@gmail.com",
"phone": "",
"website": "https://cv.maks.pw",
"summary": "Continuous progress on professional and personal fronts through all round skills with emphasis on assigned targets.",
"location": {
@mskutin
mskutin / sts-assume.log
Created Feb 4, 2019
Error configuring the backend "s3": The role "arn:aws:iam::##REPLACED_AWS_ACCOUNT_ID##:role/Terragrunt" cannot be assumed.
View sts-assume.log
ms at ms in ~/Documents/src/bitbucket/sb/sb/sb-mono/infra/live/accounts/sb-dev/ap-southeast-1/dev/vpc (add-terraform-template●●)
$ TF_LOG=trace AWS_PROFILE=sb-dev@ms terragrunt plan --terragrunt-iam-role arn:aws:iam::##REPLACED_AWS_ACCOUNT_ID##:role/Terragrunt >> assume.log
[terragrunt] [/Users/ms/Documents/src/bitbucket/sb/sb/sb-mono/infra/live/accounts/sb-dev/ap-southeast-1/dev/vpc] 2019/02/04 12:47:39 Running command: terraform --version
[terragrunt] 2019/02/04 12:47:39 Reading Terragrunt config file at /Users/ms/Documents/src/bitbucket/sb/sb/sb-mono/infra/live/accounts/sb-dev/ap-southeast-1/dev/vpc/terraform.tfvars
[terragrunt] 2019/02/04 12:47:41 Assuming IAM role arn:aws:iam::##REPLACED_AWS_ACCOUNT_ID##:role/Terragrunt
[terragrunt] 2019/02/04 12:47:41 WARNING: no double-slash (//) found in source URL /terraform-aws-modules/terraform-aws-vpc.git. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2019/02/04 12:47:41 Terraform files in /Users/ms/Documents/src/bitbucket/sb/sb/sb-mono/
@mskutin
mskutin / get-apigw-usage.ps1
Last active Nov 12, 2020
Posh script to generate an API Gateway weekly usage report in plain HTML. Ensure you have AWS Tools installed https://aws.amazon.com/powershell/
View get-apigw-usage.ps1
Import-Module -Name AWSPowerShell
Set-DefaultAWSRegion 'ap-southeast-1'
$numberOfDays = 7
$fileName = ('Gateways-' + (get-date -f yyyy-MM-dd-HH-mm-s) + '.html')
$reportLocation = Join-Path (Get-Location).path $fileName
$withMetrics = @()
$Header = @"
@mskutin
mskutin / Jenkinsfile
Created Dec 13, 2017 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
View Jenkinsfile
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
View unfollow everybody.md
  1. заходим в news feed preferences

  2. Unfollow

  3. Скроллим до упора вниз

  4. Выполняем в консоли

var a = document.querySelectorAll('[aria-label$="Following"]');
@mskutin
mskutin / lambda_function-ECS-cloudwatch-slack.py
Created Apr 19, 2017 — forked from dfetterman/lambda_function-ECS-cloudwatch-slack.py
Lambda function that takes ECS Cloudwatch events and sends a notification to Slack
View lambda_function-ECS-cloudwatch-slack.py
# Written by Dane Fetterman on 12/1/2016
# https://aws.amazon.com/blogs/compute/monitor-cluster-state-with-amazon-ecs-event-stream/
# Where they use a cloud watch event from ECS to notify a SNS topic. We're
# sending a notification directly to slack instead
import requests
import json
from boto3 import session, client