TGViewer
Channel Public Channel
نوشته‌های ترمینالی

نوشته‌های ترمینالی

@terminal_stuff

virgool.io/@rsharifnasab
github.com/rsharifnasab
Subscribers
3.52K
Photos
434
Videos
12
Links
2.4K

Showing posts older than #2830 · Back to latest

Older Posts 12 shown
Post #2828 2.01K
Post #2827 1.67K
نوشته‌های ترمینالی پاسخ هایی که به این سوال داده شد به نظرم خیلی زیبا بود و با توجه به سلیقه‌ای بودن من سعی میکنم جمع بندی نکنم تا نظرم رو تحمیل نکرده باشم، خودتون کامنت ها رو بخونید اگر دوست داشتید. به نظرم تنها نکته‌ای که در جمع بندی باید گفت و همگی موافق بودن اینه که نباید…
پیشنهاد میکنم ترجمه مطلب best practice های طراحی rest api رو بخونید.
https://javacup.ir/rest-api-best-pratice/
  • 👍 3
  • 👎 1
Post #2826 1.62K
نوشته‌های ترمینالی سوال نیمه شبانه: یه endpoint http میخوایم طراحی کنیم برای logout که از سمت یوزر هیچ دیتایی قرار نیست برن به سرور و فقط توکنش توی هدر بره کافیه. برای این اندپوینت چه متدی انتخاب کنیم؟
پاسخ هایی که به این سوال داده شد به نظرم خیلی زیبا بود و با توجه به سلیقه‌ای بودن من سعی میکنم جمع بندی نکنم تا نظرم رو تحمیل نکرده باشم، خودتون کامنت ها رو بخونید اگر دوست داشتید.
به نظرم تنها نکته‌ای که در جمع بندی باید گفت و همگی موافق بودن اینه که نباید از get استفاده بشه، چون یک متد safe محسوب میشه، یعنی فراخوانیش نباید استیت سرور رو تغییری بده.
  • 👍 5
Post #2825 1.77K
اگه شما هم مثل من برای اینکه ببینید درخواست curlتون چقدر طول می‌کشه، از time curl استفاده می‌کنید، این پست رو ببینید.
این پست آموزش میده که ما با کمک curl، برای هر قسمت از مراحل رسیدن درخواستمون از ما به سرور، تایمشو بزنیم و بتونیم درک خیلی بهتری داشته باشیم.

اینجا آموزش و توضیحات خیلی خوبی اومده
https://blog.josephscott.org/2011/10/14/timing-details-with-curl/

اگرم می‌خواید در قالب اسکریپت به سیستمتون اضافه کنید این پاسخ هم جالبه:
https://stackoverflow.com/a/22625150/10999348
blog.josephscott.org Timing Details With cURL Jon's recent Find the Time to First Byte Using Curl post reminded me about the additional timing details that cURL can provide.cURL supports formatted output for the details of the request ( see t
  • ❤ 4
  • ❤‍🔥 1
  • 👍 1
Post #2824 1.61K
یکی از چیزایی که تا حالا نتونسته بودم تو لینوکس راه بندازم، hotspot کردن بود. (البته نیازیم نداشتم ولی حالا)
اما امروز این برنامه رو پیدا کردم به اسم linux-wifi-hotspot که کارش اینه که hotspot بسازه و gui مرتبی داره.
البته کمی باگ داره و شاید با یعضی دستگاه‌ها همچنان مشکل داشته باشه
ولی در کل برای من قابل استفاده بود.

https://github.com/lakinduakash/linux-wifi-hotspot
GitHub GitHub - lakinduakash/linux-wifi-hotspot: Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line… Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Si...
Post #2823 1.34K
  • 👍 2
  • 😁 1
  • 🤔 1
Post #2812 1.16K

Forwarded from La3tKnight

The Unix env Lookup Trick

On some Unix systems, you can avoid writing the path to the Python interpreter in your script file by writing a special comment on the first line, like this:

#!/usr/bin/env python
...script goes here...

This tells the env program to find the Python interpreter based on your system's search path settings. This can make your scripts more portable, because you don't need to hard code the path to Python in the first line of all your scripts. This means that if you move your scripts to a new machine, or if Python is moved to a new location, you only need to update the PATH environment variable, not all of your scripts.

As long as env is available on all systems where you want to run your scripts, they will work no matter where Python is installed on your system. In fact, this form of env is generally recommended over even something as generic as /usr/bin/python, because some platforms may install Python in other locations. However, it is important to note that this assumes that env is installed in the same location on all systems. On some machines, it may be installed in /sbin, /bin, or another directory. If this is not the case, then your scripts will not be portable.

Learning Python: Powerful Object-Oriented Programming
Book by Mark Lutz

🗞 La3tKnight
Post #2811 940

Forwarded from Woland's Linux Journal (Woland)

دستور fc آخرین دستور شل را در ادیتور شما باز می‌کند.

#لینوکس #نکته #آموزش #بش
  • 👍 2
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →