Random shi- tutorials – Telegram
Random shi- tutorials
209 subscribers
229 photos
27 videos
12 files
546 links
محتوای مفید برنامه نویسی و لینوکسی از سراسر دنیا ✍️
جوین شدن شما موجب شادی روح و روان ما میگردد😗
Download Telegram
🚩 10 Red flags of a Software Engineer:


1) Always says “it works on my machine”

2) Doesn’t care about the product’s users or their needs

3) Never mentors or shares knowledge

4) Can’t explain what they’re doing to anyone non-technical

5) Blames PMs, design, QA, and “legacy code” for everything

6) Doesn't test their code properly (QA should do it)

7) Consistently misestimates tasks

8) Avoids documentation: "The code is self-documenting"

9) Declares "it's impossible", instead of suggesting ways to solve challenges

10)Freaks out under the pressure
Forwarded from ZGP
جایگزین ifconfig در لینوکس

nmcli -p device show

ip -c a
2
Forwarded from Shayan GeeDook🐧
⚡️ #! یا Shebang چیه؟ چرا انقدر مهمه؟
تا حالا به اول بعضی از فایل‌های اسکریپت نگاه کردی و دیدی این دوتا کاراکتر مرموز #! اون بالا نشستن؟
مثل این:

#!/bin/bash


خب، این همون Shebang معروفه.
ترکیبی از # و ! که کنار هم تبدیل می‌شن به یه خط جادویی تو دنیای یونیکس و لینوکس!

👑 داستان از کجا شروع شد؟

ماجرا برمی‌گرده به دهه ۸۰ میلادی، وقتی که سیستم‌عامل‌های شبه‌یونیکس داشتن رشد می‌کردن و توسعه‌دهنده‌ها نیاز داشتن بدونن یه اسکریپت با چه برنامه‌ای باید اجرا بشه.

توی سیستم‌عامل‌های یونیکسی، وقتی شما یه فایل رو قابل اجرا (chmod +x) می‌کنی و سعی می‌کنی اجراش کنی، سیستم باید بفهمه این فایل توسط چه تفسیری (interpreter) اجرا بشه. Bash؟ Python؟ Perl؟ Node؟


اینجاست که shebang وارد می‌شه.
این خط اول فایل، به سیستم‌عامل می‌گه: «اگه خواستی این فایل رو اجرا کنی، با این برنامه اجراش کن!»

مثال:

#!/usr/bin/python3
print("Hello, world!")

این یعنی اجراش با مفسر پایتون نسخه ۳.

🧠 چرا بهش می‌گن Shebang؟
واژه‌ی "Shebang" ترکیبیه از:

sh → اشاره به sh که همون Unix shell اولیه بوده

bang → اسمی قدیمی برای کاراکتر !

بنابراین #! می‌شه: "sh-bang"

(البته بعضی جاها بهش hashbang یا pound-bang هم می‌گن)


🎯 چرا انقدر مهمه؟
قابل حمل بودن: یه اسکریپت با روی هر سیستم یونیکسی کار می‌کنه، بدون اینکه بدونی کدوم شله

🛠 کنترل بیشتر: می‌تونی دقیقاً مشخص کنی با کدوم نسخه از مفسر اجرا بشه (مثلاً #!/usr/bin/env python3)

💻 استاندارد بودن: خیلی از ابزارها و سیستم‌ها به خط اول فایل حساسن. اگه درست نباشه، ممکنه اسکریپت اجرا نشه


💡 کاربرد جالب env توی shebang

#!/usr/bin/env python3

اینجوری سیستم خودش مسیر Python 3 رو از متغیرهای محیطی پیدا می‌کنه. برای پورتابل بودن خیلی بهتر از مسیرهای مستقیمه.

🧩 چرا هنوز ویکی‌پدیای فارسیش نیست؟!
با اینکه این مفهوم برای لینوکسی‌ها و برنامه‌نویس‌ها بسیار مهمه، توی ویکی‌پدیای فارسی هنوز صفحه‌ای به اسم Shebang یا #! وجود نداره!
وقتشه که یکی اینو به فارسی بنویسه — شاید تو باشی!

🏷 هشتگ‌ها برای پست:
#Shebang #Linux #Unix #اسکریپت #Bash #Python #DevTips #Geedook #OpenSource


🔖 منابع برای مطالعه بیشتر:

github

Wikipedia (EN) - Shebang (Unix)

stackoverflow

Linux Handbook - What is Shebang


Shayan-GeeDook 🐧
Please open Telegram to view this post
VIEW IN TELEGRAM
Forwarded from Linuxor ?
اگه تازه سایت می‌خواین بیارین بالا با این سایت می‌تونین آنالیزش کنید و بهتون می‌گه چیکار کنید که سرعت لودش بره بالا، این سایت مال خود گوگله :

pagespeed.web.dev

@Linuxor
💻 12 دستور مهم و کاربردی در Git
🔥 وقتی لینوکس نسخه هکری‌تر Sysinternals رو رو می‌کنه!
ویندوزیا عاشق Sysinternals Suite اند
ولی لینوکسی‌ها یه چیز فضایی‌تر دارن:
ابزار bpfcc-tools سطح کرنل با قدرت eBPF!

در حدی قویه که می‌تونی نفست رو هم توی کرنل ردگیری کنی😂

🤩 فقط ببین چی داره:
🔍 execsnoop → اجرای هر برنامه‌ای رو زنده ببین
📁 opensnoop → ببین کی داره کدوم فایل رو باز می‌کنه
📡 tcpconnect → چه اتصالی از کجا زده شده
📊 tcplife → عمر و دیتاهای هر کانکشن
💣 bashreadline → دستورات زنده‌ای که تایپ می‌شن!

نصب :
sudo apt install bpfcc-tools 

برای اجرای مثلا execsnoop
sudo execsnoop-bpfcc
🔥1
Forwarded from The Smart Candel
List of the most useful curl commands!

🎯 Most Useful curl Commands for Downloading and Interacting with URLs
(With Emoji for Better Understanding)

# 1️⃣ Basic GET Request
Use curl to fetch the content of a URL.
curl https://example.com


# 2️⃣ Save to a File
Use -o to save the downloaded content to a file.
curl -o filename.html https://example.com


# 3️⃣ Display Response Headers
Use -I to only fetch the response headers.
curl -I https://example.com


# 4️⃣ Follow Redirects
Use -L to follow redirects (if the URL redirects you).
curl -L https://example.com


# 5️⃣ Download a File (with Resume)
Use -C to resume a partially downloaded file.
curl -C - -O https://example.com/largefile.zip


# 6️⃣ Show Progress
Use -# to show a progress bar during download.
curl -# -O https://example.com/largefile.zip


# 7️⃣ Download a Torrent
Use -o to download and save a .torrent file.
curl -o ubuntu-22.04.iso.torrent https://releases.ubuntu.com/22.04/ubuntu-22.04.5-live-server-amd64.iso.torrent


# 8️⃣ Send a POST Request
Use -X POST to send data to a server (e.g., form submission).
curl -X POST -d "username=user&password=pass" https://example.com/login


# 9️⃣ Include Custom Headers
Use -H to add custom headers to your request.
curl -H "Authorization: Bearer TOKEN" https://api.example.com/data


# 🔟 Make a PUT Request
Use -X PUT to send data to update a resource.
curl -X PUT -d '{"name": "John"}' -H "Content-Type: application/json" https://example.com/update


# 🔒 Send Data with Authentication
Use -u to pass authentication credentials.
curl -u username:password https://example.com


# 1️⃣1️⃣ Save Cookies
Use -c to save cookies to a file.
curl -c cookies.txt https://example.com


# 1️⃣2️⃣ Use Cookies from a File
Use -b to send cookies from a saved file.
curl -b cookies.txt https://example.com


# 1️⃣3️⃣ Limit Download Speed
Use --limit-rate to limit download speed.
curl --limit-rate 100K -O https://example.com/largefile.zip


# 1️⃣4️⃣ Show Full Request & Response
Use -v for verbose output (request and response details).
curl -v https://example.com


# 1️⃣5️⃣ Send Data as JSON
Use -H and -d to send data as JSON.
curl -X POST -H "Content-Type: application/json" -d '{"key": "value"}' https://example.com/api


# 1️⃣6️⃣ Access a URL with SSL Verification Disabled
Use -k or --insecure to skip SSL certificate verification (not recommended for production).
curl -k https://example.com


# 1️⃣7️⃣ Limit Request Time
Use --max-time to limit the total request time.
curl --max-time 10 https://example.com


# 1️⃣8️⃣ Download Multiple Files
Use -O to download multiple files at once.
curl -O https://example.com/file1.zip -O https://example.com/file2.zip


# 1️⃣9️⃣ Get Information About the URL
Use -I to fetch only headers for a URL.
curl -I https://example.com


# 2️⃣0️⃣ Use a Proxy
Use -x to route your request through a proxy.
curl -x proxy.example.com:8080 https://example.com



🔖 Tags:
#PenetrationTesting #آسیب_پذیری #Vulnerability #SQLInjection #XSS #CSRF #DoS #DDoS #فیشینگ #Phishing #مهندسی_اجتماعی #SocialEngineering #رمزنگاری #Cryptography #کلاهبرداری_اینترنتی #OnlineFraud #امنیت_داده #DataSecurity #حریم_خصوصی #Privacy #BugBountyHunting #باگ_پولی #پاداش_باگ #برنامه_باگ_هانتیگ #BugBountyProgram #WebHacking #WebSecurity #NetworkSecurity #Cybersecurity #امنیت_اطلاعات #فیلتر_شکن #وی_پی_ان #سرور #کانفیگ #vps



🔹 Share & Support Us 🔹
✉️ Channel : @ELITE_DRAGONS
من کتاب مهندسی پرامپت گوگل که چند روزه وایرال شده رو به فارسی ترجمه کردم و گذاشتم روی گیتهاب.

کتاب خوبیه، سبکه و اصول اولیه و روش‌های اصلی رو شرح داده و دسته‌بندی کرده و خواننده یه جورایی شیرفهم میشه که چطوری میشه پرامپت نوشت.

بخونین و به اشتراک بذارید
https://teal33t.github.io/prompt-engineering/

~ Saman
👍1
Forwarded from Linuxor ?
یه نفر تجربه 2 ساله خودش از استفاده از Rust رو نوشته، اگه می‌خواین تازه Rust یاد بگیرین خیلی جلوتون می‌ندازه

borretti.me/article/two-years-of-rust


@Linuxor
Forwarded from Linuxor ?
Media is too big
VIEW IN TELEGRAM
لو رفتن کل سورس کد پروژتون با حواس پرتی دایرکتوری .git


از بخش A05:2021-Security-Misconfiguration در OWASP-TOP10
لینک ابزار معرفی شده :

https://github.com/arthaud/git-dumper


@Linuxor
Forwarded from Linuxor ?
دنبال انیمیشن Html Css برای Loading می‌گشتم اینو پیدا کردم توش کلی Loading های حوصله سر نبر داره از ساده بگیر تا آونگ و ماشین لباس شویی ...

cssloaders.github.io


@Linuxor
بهترین منابع و پلی‌لیست‌های یوتیوب برای فراگیری اصول پایه‌ای استارتاپ‌ها | قسمت اول:

1- How to Start a Startup BY YCombinator

هنوز بعد از گذشت‌ سال‌ها که محتواهای آموزشی درخصوص استارتاپ‌ها منتشر شده و شرکت‌ها و سایت‌های مختلف دوره‌های مختلفی رو تولید کردند، به نظرم این دوره YCombinator با اختلاف از همشون بهتره. اساتید درجه یک مثل سم‌آلتمن و پیترتیل و بیان پایه‌ای اصول استارتاپ‌ها با بیان ساده شکل این دوره رو به کامل‌ترین و بهترین منبع برای شروع یادگیری مفاهیم استارتاپ‌ها تبدیل کرده.

2- Startup School: The First 100 Days By Stanford Online

محتوای مدیریتی و کسب‌وکاری استنفورد همیشه زبان‌زد بوده. توی این دوره بهترین‌های این حوزه به استنفورد دعوت شدن و با تمرکز بر ۱۰۰ روز آغازین شروع کسب‌وکار، مفاهیم مرتبط مطرح می‌شه.

3- Startup School By Y Combinator

یه دوره عالی دیگه از YCombinator که یه مقدار جزئی‌تر به اصول جذب‌مشتری و سنجه‌های فروش و قیمت‌گذاری و … اشاره می‌کنه.

~ Productcademy

#کاربردی