Skip to content

Instantly share code, notes, and snippets.

View margani's full-sized avatar
🌍
Happy!

Hossein Margani margani

🌍
Happy!
View GitHub Profile
@margani
margani / node-typescript-esm.md
Created November 21, 2023 16:29 — forked from khalidx/node-typescript-esm.md
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@margani
margani / linux-font-config.md
Created October 28, 2023 16:49 — forked from morealaz/linux-font-config.md
تنظیمات فونت لینوکس

تنظیمات فونت لینوکس

مقدمه

تنظیمات فونت در لینوکس بر عهده برنامه fontconfig میباشد. این برنامه فونتهای سیستم را بر اساس الویت بندیهایی که قابل تنظیم میباشد مرتب میکند و در اختیار سایر برنامه ها قرار می دهد. مشکل اصلی که اکثر کاربران فارسی زبان لینوکس در ارتباط با fontconfig دارند عدم نمایش صحیح حروف فارسی می باشد که معمولا به دو دلیل زیر اتفاق می‌افتد:

  • نصب نبودن فونت مناسب بر روی سیستم که حروف فارسی را ساپورت کند
  • عدم وجود فایل تنظیمات fontconfig برای انتخاب فونت مناسب برای نمایش حروف فارسی
@margani
margani / restore_last_git_modified_time.sh
Last active December 6, 2021 05:22 — forked from HackingGate/restore_last_git_modified_time.sh
Retrieve and set the last modification date of all files in a git repository. Solution for https://stackoverflow.com/a/55609950/4063462 #git #date
#!/bin/sh -e
OS=${OS:-`uname`}
if [ "$OS" = 'Darwin' ]; then
get_touch_time() {
date -r ${unixtime} +'%Y%m%d%H%M.%S'
}
else
# default Linux