Skip to content

Instantly share code, notes, and snippets.

View Bakhtiyar-Garashov's full-sized avatar
🇦🇿
Focusing

Bəxtiyar Bakhtiyar-Garashov

🇦🇿
Focusing
View GitHub Profile
@Bakhtiyar-Garashov
Bakhtiyar-Garashov / cra-vite-bun.md
Last active July 14, 2022 10:34
CRA, Vite.js və Bun müqayisəsi

Salamlar.

Düşünürəm ki, JavaScript dünyasında yeni olanlar üçün tooling seçimi ən çaşdırıcı mövzulardan biri hesab oluna bilər. Xüsusən də nəzərə alsaq ki, JavaScript üçün eyni işi görən (təxminən) həddən artıq çox alət mövcuddur. Bu kiçik məqalədə React əsasında təcrübə etdiyim 2 və ən yeni elan olunan 1 alət haqqında məlumat verməyə və həmçinin kiçik müqayisə aparmağa çalışacam.

Create-react-app (bundan sonra qısaca CRA)

Bildiyimiz kimi React proyektinin yaradıcıları tərəfindən eyni zamanda yeni bir proyekt yaratmaq üçün alət təqdim olunub və rəsmi olaraq ən çox istifadə olunan hesab olunur. Həmçinin bu proyektin müəllifinin Dan Abramov olması artıq hərşeyi açıqlayır ) Proyekt reposu hazırda rəsmi olaraq Facebook Github orqanizasiyası altında saxlanılır və aktiv şəkildə dəstəklənir. CRA JavaScript dili istifadə edilərək yazılıb. Istifadəsi çox asandır - Node.js yüklədikdən sonra (minimum versiya Node 14 olması tələb olunur)

npx create-react-app
@Bakhtiyar-Garashov
Bakhtiyar-Garashov / README.md
Created March 12, 2022 14:54 — forked from chriswhong/README.md
Node.js proxy endpoint to access TMS tiles via XYZ url

TMS vs XYZ

Web map raster tile URL templates usally look like this: //{servername}/{somepath}/{z}/{x}/{y}.png

Z is the zoom level (0 being zoomed all the way out so the earth fits on a single 256px x 256px tile, 18 or higher getting you down to street level) X and Y are the tiles coordinates, but there are two different standards for where the origin of the Y coordinate is.

If you look at [http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/](this site) which shows the various tile coordinates, you'll see that the X's are identical for 'Google' and 'TMS', but the Ys are different. 'Google', aka 'XYZ' aka a few other names that nobody seems to agree on places the Y origin at the north end of the earth, while TMS places it in the south.

Re-serve a TMS tileset as an XYZ tileset using express.js

@Bakhtiyar-Garashov
Bakhtiyar-Garashov / aws-s3-py-unit-testing.md
Last active March 9, 2022 21:04
How to unit test AWS S3 integration with Python

Hi, reader. I hope that you will find this short practical article helpful (and don't lie please, we all hate writing unit tests I know).

Today while developing a service in my daily job I have faced an issue when trying to write simple unit tests for the functions. First let me introduce what is our actual code that I am willing to cover with tests.

Imagine we have 3 functions as shown below. While writing the code for functions we need to consider that we are going to write unit tests for them. It is really important to write testable code (I'd suggest to read this book). If you have a function which violets SOLID's S principle (google it) and does more than one thing (e.g., creating a session and downloading file from the bucket) it will be cumbersome to write the test for this function. Taking into account this, I am going to parameterize important things so that in the unit test we can mock them and pass to function ea

@Bakhtiyar-Garashov
Bakhtiyar-Garashov / Readme.md
Created January 14, 2022 08:21 — forked from iosifnicolae2/Readme.md
The Boring Youtube

How Make Youtube Less Boring

Mark as "Not interesting" all the videos.

Paste the below code in your browser console (F12 > Console):

await markAllVideosAsNotBeingInteresting({
    iterations: 1
});

async function markAllVideosAsNotBeingInteresting({iterations}) {
@Bakhtiyar-Garashov
Bakhtiyar-Garashov / devops_best_practices.md
Created June 14, 2021 08:05 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud