Skip to content

Instantly share code, notes, and snippets.

View kagarlickij's full-sized avatar
Working from home

Dmytro Kaharlytskyi kagarlickij

Working from home
View GitHub Profile
kagarlickij /
Created November 18, 2021 12:04
Clean history of Git branch

git checkout --orphan TEMP_BRANCH
git add -A
git commit -am "cleanup"
git branch -D master
git branch -m master
git push -f origin master

kagarlickij / pylint.svg
Last active June 28, 2020 11:46
Created via API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
kagarlickij /
Created April 18, 2020 15:20
Python snippet to send email
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
import sys
import os
smtpLogin = sys.argv[1]
smtpPassword = sys.argv[2]
smtpServer = sys.argv[3]
smtpPort= sys.argv[4]
kagarlickij /
Created January 24, 2020 10:45
Sample Ansible playbook that uses Windows hostname for creating file and running command

ansible-playbook -vvvv -i hosts playbook.yml --extra-vars='ansible_user=ansible ansible_password=A****0+ ansible_connection=winrm ansible_winrm_server_cert_validation=ignore var1=value1'

kagarlickij /
Created December 16, 2019 09:05
Snippet creates AWS S3 bucket using Python with Boto3
import json
import boto3
from botocore.exceptions import ClientError
# Default values
aws_region = 'eu-west-1'
client_name = 'kag'
environment = 'sbx'
kagarlickij / openapi.json
Last active March 26, 2019 09:41
AWS API Gateway PetStore sample
"swagger": "2.0",
"info": {
"description": "Your first API with Amazon API Gateway. This is a sample API that integrates via HTTP with our demo Pet Store endpoints",
"title": "PetStore"
"schemes": [
"paths": {
"schemaVersion": "1.0",
"description": "CloudWatch for Windows Instances",
"runtimeConfig": {
"aws:cloudWatch": {
"properties": {
"EngineConfiguration": {
"PollInterval": "00:00:15",
"Components": [
kagarlickij / .zshrc
Last active August 12, 2019 10:47
This is ZSH config file located in ~/
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/kagarlickij/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See
Created on: Apr 2016
Created by: Dmitriy Kagarlickij
This script should be executing with Administrator-level permissions
kagarlickij / Jenkinsfile
Created June 7, 2018 14:20
Jenkins scripted pipeline parallel execution
node {
stage ('clean') {
stage ('checkout') {
git credentialsId: 'bla-bla-bla',
url: ''
parallel admin: {
stage ('myapp-admin-pipeline') {