Skip to content

Instantly share code, notes, and snippets.

View mskutin's full-sized avatar
🪄
Evanesco! 🪄

Maksim Skutin mskutin

🪄
Evanesco! 🪄
View GitHub Profile
@mskutin
mskutin / week15.md
Created April 17, 2022 10:09
AWS Weekly
@mskutin
mskutin / renew-gpgkey.md
Created August 11, 2020 16:37 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

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:

# 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]
@mskutin
mskutin / pwnd.gif
Last active December 22, 2020 18:24
Mother Russia
pwnd.gif
{
"basics": {
"name": "Maksim Skutin",
"label": "DevOps Engineer",
"picture": "https://en.gravatar.com/userimage/96649416/baa527120c21fdfd266f9f6c54934068.jpg?size=1200",
"email": "[email protected]",
"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 February 4, 2019 06:57
Error configuring the backend "s3": The role "arn:aws:iam::##REPLACED_AWS_ACCOUNT_ID##:role/Terragrunt" cannot be assumed.
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 November 12, 2020 17:41
Posh script to generate an API Gateway weekly usage report in plain HTML. Ensure you have AWS Tools installed https://aws.amazon.com/powershell/
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 December 13, 2017 11:32 — 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, ...
#!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>
  1. заходим в news feed preferences

  2. Unfollow

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

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

var a = document.querySelectorAll('[aria-label$="Following"]');
@mskutin
mskutin / lambda_function-ECS-cloudwatch-slack.py
Created April 19, 2017 04:19 — forked from dfetterman/lambda_function-ECS-cloudwatch-slack.py
Lambda function that takes ECS Cloudwatch events and sends a notification to Slack
# 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