Skip to content

Instantly share code, notes, and snippets.

@kuzemkon
kuzemkon / ecs-fargate.tf
Last active December 13, 2022 12:03
Terraform IaaC for AWS ECS with Fargate and AWS Application Load Balancer
variable "env" {
type = string
default = "dev"
}
variable "api_host" {
type = string
default = "my.api.com"
}
@kuzemkon
kuzemkon / main.tf
Last active June 18, 2024 09:47
AWS ECS events CloudWatch metrics gathering Terraform
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
provider "aws" {
@kuzemkon
kuzemkon / multiple_ssh_setting.md
Created October 29, 2019 09:38 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@kuzemkon
kuzemkon / request-response.go
Created December 1, 2017 16:08
Creating HTTP request and handling response from it using Go lang
data := new(StripeInitParams)
r.UnmarshalBody(data)
data.ClientSecret = util.Config.StripeTest
data.GrantType = "authorization_code"
requestJson, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", "https://connect.stripe.com/oauth/token", bytes.NewBuffer(requestJson))
req.Header.Set("Content-Type", "application/json")
@kuzemkon
kuzemkon / listFromInterface.go
Created August 24, 2017 12:13
Golang: parsing list from the interface
func listFromInterface(x interface{})([]interface{}, error) {
s := reflect.ValueOf(x);
fmt.Println(s)
if valueType := s.Kind(); valueType != reflect.Slice && valueType != reflect.Array && valueType != reflect.String {
return nil, fmt.Errorf("Given a non-list type");
}
pe := make([]interface{}, s.Len())
for i := 0; i < s.Len(); i++ {
pe[i] = s.Index(i).Interface()
@kuzemkon
kuzemkon / run.c
Created November 29, 2016 10:44
11 lab numberical methods
#include <stdio.h>
#include <math.h>
double c = 5;
double x0=0.0;
double y0=1.0;
double f(double x, double y){
return 2 * pow(x, 2) + y;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration</title>
</head>
<body>
<header>
<h1>Registration</h1>
@kuzemkon
kuzemkon / networkspeed.sh
Created October 14, 2016 15:55
Install network speed tester
wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
sudo mv speedtest-cli /usr/bin
@kuzemkon
kuzemkon / xcarchive2ipa
Created September 2, 2016 21:36 — forked from samma835/xcarchive2ipa
How to convert .xcarchive to .ipa
xcodebuild -exportArchive -exportFormat ipa -archivePath {PATH}/MyApp.xcarchive -exportPath ~/Desktop/MyApp.ipa
@kuzemkon
kuzemkon / bash
Created August 5, 2016 19:33
VirtualBox links setup
# if running inside VirtualBox on a shared folder
# you must enable symlinks on the shared folder
$ VBoxManage setextradata "<vm name>" VBoxInternal2/SharedFoldersEnableSymlinksCreate/<shared folder> 1
# verify with
$ VBoxManage getextradata "<vm name>" enumerate