Skip to content

Instantly share code, notes, and snippets.

@ivankatliarchuk
ivankatliarchuk / proxy-aws-sdk-v1.go
Last active February 15, 2025 22:49 — forked from jakexks/aws.go
Proxy in AWS SDK GO
package main
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"net/http"
"net/url"
)
@ivankatliarchuk
ivankatliarchuk / github-actions-notes.md
Created May 20, 2022 23:21 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
@ivankatliarchuk
ivankatliarchuk / docker-compose.yml
Created May 14, 2020 07:01 — forked from smashnet/docker-compose.yml
Docker-Compose: Mastodon v3.1.3 with Traefik v2
version: '3'
# Variables to fill in:
# Line 23: <LETSENCRYPT_MAIL_ADDRESS> - your mail address for contact with Let's Encrypt
# Line 36: <TRAEFIK_DASHBOARD_ADMIN_PASSWORD> - MD5 hash of your password (use http://www.htaccesstools.com/htpasswd-generator/)
# Line 54: <POSTGRES_PASSWORD> - the password for the postgres db. Use the same during mastodon:setup!
# Lines 31, 85, 109: <DOMAIN> - e.g. social.yourdomain.com (Must have an A record pointing to your box' IP) (AAAA for IPv6 ;)
services:
traefik:
@ivankatliarchuk
ivankatliarchuk / brewv.sh
Created January 25, 2020 18:33 — forked from demosten/brewv.sh
Install specific version of a Homebrew formula
#!/bin/bash
#
# Install specific version of a Homebrew formula
#
# Usage: brewv.sh formula_name desired_version
#
# Notes:
# - this will unshallow your brew repo copy. It might take some time the first time
# you call this script
# - it will uninstall (instead of unlink) all your other versions of the formula.
@ivankatliarchuk
ivankatliarchuk / aws-s3-gzip-compression.py
Created January 5, 2020 21:01 — forked from sukharevd/aws-s3-gzip-compression.py
Synchronizes directory with gzipped content of Amazon S3 bucket with local one to avoid redundant synchronization requests when files were not changed, but MD5 sums of Gzipped files are different.
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
AWS S3 Gzip compression utility
Author: Dmitriy Sukharev
Modified: 2013-09-11
-------
Synchronizes directory with gzipped content of Amazon S3 bucket with local
@ivankatliarchuk
ivankatliarchuk / DynamoEnumConverter
Created December 27, 2019 21:13 — forked from jvwing/DynamoEnumConverter
For use with Amazon DynamoDB DataModel API for .NET. This class can be used to automagically serialize enum properties to DynamoDB, by decorating the property with the attribute [DynamoDBProperty(typeof(DynamoEnumConverter<AccountStatus>))], where "AccountStatus" is the name of the enumerated type..
public class DynamoEnumConverter<TEnum> : IPropertyConverter
{
public object FromEntry(DynamoDBEntry entry)
{
string valueAsString = entry.AsString();
TEnum valueAsEnum = (TEnum)Enum.Parse(typeof(TEnum), valueAsString);
return valueAsEnum;
}
public DynamoDBEntry ToEntry(object value)
@ivankatliarchuk
ivankatliarchuk / updateSecurityGroup.js
Created December 25, 2019 09:26 — forked from rowanu/updateSecurityGroup.js
Update an AWS Security Group to allow access by a specific AWS service.
'use strict';
const AWS = require('aws-sdk');
const https = require('https');
const ec2 = new AWS.EC2();
const ipRangesUrl = 'https://ip-ranges.amazonaws.com/ip-ranges.json';
const target = {
port: 5432,
protocol: 'tcp',
@ivankatliarchuk
ivankatliarchuk / Jenkinsfile
Created May 17, 2019 19:14 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@ivankatliarchuk
ivankatliarchuk / gist:18c6506816a11e3264fe62b5be42e45d
Created December 20, 2018 23:55 — forked from Miuler/gist:4134020
Benchmarks for Gatling: Gatling's simulation
package jmeter
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import bootstrap._
class JMeterBenchmark extends Simulation {
def apply = {