Skip to content

Instantly share code, notes, and snippets.

View tatarianBarbarian's full-sized avatar
⚜️
Per rectum ad astra

Feliks Khafizov tatarianBarbarian

⚜️
Per rectum ad astra
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tatarianbarbarian on github.
  • I am fkhafizov (https://keybase.io/fkhafizov) on keybase.
  • I have a public key ASCpfRZacXHC2GPeG6fHAI3k1fLkpPKp3yt9aw31rc9c_go

To claim this, I am signing this object:

@tatarianBarbarian
tatarianBarbarian / data-mapper-active-record-diff.md
Last active March 3, 2023 14:51
I asked ChatGPT to explain a Data Mapper, and then tell me about how it differs from Active Record

Tell me about Data Mapper pattern. Please use Javascript code and ascii illustrations.


The Data Mapper pattern is a software design pattern that separates the data persistence logic from the domain model. This separation allows the domain model to remain independent of the database or other data storage mechanisms, making it easier to maintain and test.

Here's an example implementation of the Data Mapper pattern in JavaScript:

class User {
@tatarianBarbarian
tatarianBarbarian / pattern-explanation.md
Last active March 3, 2023 13:34
I asked ChatGPT to explain me Abstract Factory pattern

Can you explain me abstract factory pattern? Use javascript and ascii illustrations.


Sure, I'd be happy to explain the abstract factory pattern!

The abstract factory pattern is a design pattern that provides an interface for creating families of related objects without specifying their concrete classes. This pattern is useful when you want to create different types of objects that belong to a specific family, but you don't want to tightly couple your code to those specific types.

Here's an example implementation of the abstract factory pattern in JavaScript:

@tatarianBarbarian
tatarianBarbarian / node-js-learn-path.md
Last active March 3, 2023 13:34
I asked ChatGPT to generate me a detailed 90-days learning plan on becoming backend Node.js developer.

Can you generate to me 90 days detailed crash course on becoming backend node.js developer. If so, list me first 15 days.


Sure, I can provide you with a 90-day crash course on becoming a backend Node.js developer. Here are the first 15 days of the course:

Day 1-2: Introduction to Node.js

  • Learn what Node.js is and what it can do
@tatarianBarbarian
tatarianBarbarian / update-git.sh
Created September 20, 2021 08:07 — forked from YuMS/update-git.sh
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@tatarianBarbarian
tatarianBarbarian / aliases
Created April 26, 2019 13:20
Git aliases
[alias]
co = checkout
cob = checkout -b
ci = commit -m
st = status
br = branch
cbr = !git br | grep '*' | cut -d ' ' -f2
del = branch -D
pu = pull
pux = !git push origin $(git cbr)
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel