Skip to content

Instantly share code, notes, and snippets.

@kuzemkon
kuzemkon / aws-ec2-acm.tf
Last active September 4, 2024 15:14
aws-ec2-acm.tf
// main.tf
// Specify the AWS provider version
provider "aws" {
version = "5.64.0"
region = "us-east-1" // Adjust the region as needed
}
// Data source to get the default VPC
data "aws_vpc" "default" {
@kuzemkon
kuzemkon / ecs-fargate.tf
Last active August 8, 2024 04:24
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