Skip to content

Instantly share code, notes, and snippets.

View Dzhan85's full-sized avatar

Atadzhan Dzhan85

View GitHub Profile
@Dzhan85
Dzhan85 / install_postgresql_on_ubuntu.md
Created March 25, 2025 11:47 — forked from ammarshah/install_postgresql_on_ubuntu.md
Install PostgreSQL 17 on Ubuntu 24.04

Install PostgreSQL 17 on Ubuntu 24.04

1. Import the repository signing key:

$ sudo apt install curl ca-certificates
$ sudo install -d /usr/share/postgresql-common/pgdg
$ sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc

2. Create the repository configuration file:

@Dzhan85
Dzhan85 / README.md
Created September 28, 2024 10:58 — forked from etiennetremel/README.md
Simple Wireguard setup as VPN server and multiple clients

Simple WireGuard configuration

1 server, 2 clients

Getting started

Install Wireguard on all machines.

Generate all keys

@Dzhan85
Dzhan85 / docker-compose.yml
Created February 28, 2024 08:31 — forked from benoitpetit/docker-compose.yml
complete Gitlab installation and a runner with docker
version: '4.5'
services:
# GITLAB
gitlab-web:
image: 'gitlab/gitlab-ce:latest'
restart: always
container_name: gitlab-web
hostname: '192.168.0.14'
environment:
@Dzhan85
Dzhan85 / .golang-example-gitlab-ci.yml
Created February 2, 2024 08:08 — forked from mikeatlas/.golang-example-gitlab-ci.yml
Example Go GitLab CI setup (no root/sudo required)
# See docs/examples
# http://doc.gitlab.com/ce/ci/quick_start/README.html
# http://doc.gitlab.com/ce/ci/yaml/README.html
# GitLab CI template for Go tests. Note this installs
# a new working copy of Go in a non-standard path such
# that sudo/root is not needed for the install stage.
# note that this particular install-environment stage
# is overly verbose in order to debug anything tricky
@Dzhan85
Dzhan85 / main.workflow
Created October 16, 2022 12:41 — forked from pahud/main.workflow
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"

Prerequirements:

  • Have Elasticseach + Kibana installed
  • Have server.basePath: "/kibana" option configured in your kibana.yml file

i. Install NGINX apt install nginx

ii. Modify nginx.conf

In /etc/nginx/nginx.conf you should have a similar setup:

@Dzhan85
Dzhan85 / ELK with Nginx.md
Created September 13, 2022 09:24 — forked from Dev-Dipesh/ELK with Nginx.md
Setting up Elasticsearch, Logstash and Kibana with Nginx.

ELK (Elasticsearch Logstash Kibana)

Though we're focused more on server setup procedure in this document, I will still give a very brief explanation in laymen terms for ELK. To those who are starting new in this stack, must have already heard of MVC (Model View Controller), so take it like this:

  • Model => Elasticsearch (for Storage, Indexing & Search)
  • View => Kibana (for DataViz & G-Man, yeah the one in half life 😏)
  • Controller => Logstash (For Logs & Filtering)

@Dzhan85
Dzhan85 / deploy-mern.md
Created September 5, 2022 08:39 — forked from rmiyazaki6499/deploy-mern.md
Deploying a Production ready React-Express app on AWS EC2 with CI/CD

Deploying a Production ready React-Express app on AWS

In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • A React frontend, Express backend
  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
@Dzhan85
Dzhan85 / aws_ec2_ubuntu_userdata_docker.sh
Created September 5, 2022 08:03 — forked from gonzaloplaza/aws_ec2_ubuntu_userdata_docker.sh
Script to auto install Docker (last version) into AWS EC2/Ubuntu instance at launch time: User Data
#!/bin/bash
# Install docker
apt-get update
apt-get install -y cloud-utils apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
@Dzhan85
Dzhan85 / handling_multiple_github_accounts.md
Created July 13, 2022 06:40 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes