Skip to content

Instantly share code, notes, and snippets.

View SeyyedKhandon's full-sized avatar
😃
the only way to go fast is to go well.

SeyyedKhandon SeyyedKhandon

😃
the only way to go fast is to go well.
View GitHub Profile
@slavafomin
slavafomin / 00-typescript-esm.md
Last active July 21, 2024 17:38
Using TypeScript with native ESM

Using TypeScript Node.js with native ESM

This reference guide shows how to configure a TypeScript Node.js project to work and compile to to native ESM.

Rationale

CommonJS module system was introduced by the Node.js developers due to the lack of the notion of "modules" in the original JavaScript (ECMAScript) language specification at that time. However, nowadays, ECMAScript has a standard module system called ESM — ECMAScript Modules, which is a part of the accepted standard. This way CommonJS could be considered vendor-specific and obsolete/legacy. Hopefully, TypeScript ecosystem now supports the "new" standard.

So the key benefits are:

@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active July 4, 2024 21:53
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \
@YamlEngineer
YamlEngineer / subtranslator
Last active December 11, 2021 09:47
php Subtitle translator
#!/usr/bin/env php
<?php
error_reporting(0);
$languages = [
"af" => "Afrikaans",
"sq" => "Albanian",
"am" => "Amharic",
"ar" => "Arabic",
"hy" => "Armenian",
"az" => "Azerbaijani",
@SeyyedKhandon
SeyyedKhandon / craco-scss-variables.md
Last active May 19, 2021 11:35
import variable.scss everywhere using craco
  1. yarn add @craco/craco --dev

  2. create craco.config.js at the root of your project, and put these in it

module.exports = {
  reactScriptsVersion: 'react-scripts',
  style: {
    sass: {
 loaderOptions: {
@nukopy
nukopy / starship.toml
Created November 1, 2020 14:34
Simple theme with Starship
########################################
# prompt global settings
########################################
# document link: https://starship.rs/ja-JP/config/#%E3%83%95%E3%82%9A%E3%83%AD%E3%83%B3%E3%83%95%E3%82%9A%E3%83%88
# format = "$all"
format = """
$username\
$hostname\
$shlvl\
@SeyyedKhandon
SeyyedKhandon / cloudSettings
Last active October 31, 2020 05:29
cloudsettings
{"lastUpload":"2020-10-31T05:29:39.512Z","extensionVersion":"v3.4.3"}

Boolean() or !! (double bang, double negation)?

What's the best way to answer the question "true or false?" in JavaScript

JavaScript does not bother you too much with types (at first), which is both a blessing and a cure. But we all know the Boolean type. Boolean variables can either be true or false. Yes or no.

Every value in JavaScript can be translated into a boolean, true or false. Values that translate to true are truthy, values that translate to false are falsy. Simple.

This is about two ways to make that translation.

@parmentf
parmentf / ConventionalCommitsEmoji.md
Last active May 20, 2024 03:18
Emoji for Conventional Commits
Type Emoji code
feat :sparkles:
fix 🐛 :bug:
docs 📚 :books:
style 💎 :gem:
refactor 🔨 :hammer:
perf 🚀 :rocket:
test 🚨 :rotating_light:
build 📦 :package:
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 23, 2024 11:29
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question: