Forwarded from Webinarfarsi | Soheib Kiani | وبینار فارسی
نکته خوب از زبان برنامه نویس اسبق گوگل در مورد refactoring
https://www.linkedin.com/posts/dryuan_cleancode-refactoring-technicaldebt-activity-7316136240469155840-mQic?utm_source=share&utm_medium=member_android&rcm=ACoAAD0lsT0BtYSF42wgWR-cYqcAiCrCBgM5hJc
https://www.linkedin.com/posts/dryuan_cleancode-refactoring-technicaldebt-activity-7316136240469155840-mQic?utm_source=share&utm_medium=member_android&rcm=ACoAAD0lsT0BtYSF42wgWR-cYqcAiCrCBgM5hJc
Linkedin
Refactoring code: risks and considerations | Feng Yuan posted on the topic | LinkedIn
It seems I have different options on lots of stuff, including cleaning/refactoring code.
If you have your own code base, clean as much as often as you want. You take all the risk/glory.
But if you're working on a big critical piece of software, be very…
If you have your own code base, clean as much as often as you want. You take all the risk/glory.
But if you're working on a big critical piece of software, be very…
Forwarded from Webinarfarsi | Soheib Kiani | وبینار فارسی
🚩 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
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
nmcli -p device show
ip -c a
❤2
Forwarded from Shayan GeeDook🐧
تا حالا به اول بعضی از فایلهای اسکریپت نگاه کردی و دیدی این دوتا کاراکتر مرموز #! اون بالا نشستن؟
مثل این:
#!/bin/bash
خب، این همون Shebang معروفه.
ترکیبی از # و ! که کنار هم تبدیل میشن به یه خط جادویی تو دنیای یونیکس و لینوکس!
ماجرا برمیگرده به دهه ۸۰ میلادی، وقتی که سیستمعاملهای شبهیونیکس داشتن رشد میکردن و توسعهدهندهها نیاز داشتن بدونن یه اسکریپت با چه برنامهای باید اجرا بشه.
توی سیستمعاملهای یونیکسی، وقتی شما یه فایل رو قابل اجرا (chmod +x) میکنی و سعی میکنی اجراش کنی، سیستم باید بفهمه این فایل توسط چه تفسیری (interpreter) اجرا بشه. Bash؟ Python؟ Perl؟ Node؟
اینجاست که shebang وارد میشه.
این خط اول فایل، به سیستمعامل میگه: «اگه خواستی این فایل رو اجرا کنی، با این برنامه اجراش کن!»
مثال:
#!/usr/bin/python3
print("Hello, world!")
این یعنی اجراش با مفسر پایتون نسخه ۳.
واژهی "Shebang" ترکیبیه از:
sh → اشاره به sh که همون Unix shell اولیه بوده
bang → اسمی قدیمی برای کاراکتر !
بنابراین #! میشه: "sh-bang"
(البته بعضی جاها بهش hashbang یا pound-bang هم میگن)
✨ قابل حمل بودن: یه اسکریپت با روی هر سیستم یونیکسی کار میکنه، بدون اینکه بدونی کدوم شله🛠 کنترل بیشتر: میتونی دقیقاً مشخص کنی با کدوم نسخه از مفسر اجرا بشه (مثلاً #!/usr/bin/env python3)💻 استاندارد بودن: خیلی از ابزارها و سیستمها به خط اول فایل حساسن. اگه درست نباشه، ممکنه اسکریپت اجرا نشه
#!/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
GitHub
free-programming-books/books/free-programming-books-langs.md at main · EbookFoundation/free-programming-books
:books: Freely available programming books. Contribute to EbookFoundation/free-programming-books development by creating an account on GitHub.
Forwarded from Linuxor ?
اگه تازه سایت میخواین بیارین بالا با این سایت میتونین آنالیزش کنید و بهتون میگه چیکار کنید که سرعت لودش بره بالا، این سایت مال خود گوگله :
pagespeed.web.dev
@Linuxor
pagespeed.web.dev
@Linuxor
Forwarded from Byteforge / بایــت فورج 🛸
🔥 وقتی لینوکس نسخه هکریتر Sysinternals رو رو میکنه!
ویندوزیا عاشق Sysinternals Suite اند
ولی لینوکسیها یه چیز فضاییتر دارن:
✅ ابزار bpfcc-tools سطح کرنل با قدرت eBPF!
🤩 فقط ببین چی داره:
🔍 execsnoop → اجرای هر برنامهای رو زنده ببین
📁 opensnoop → ببین کی داره کدوم فایل رو باز میکنه
📡 tcpconnect → چه اتصالی از کجا زده شده
📊 tcplife → عمر و دیتاهای هر کانکشن
💣 bashreadline → دستورات زندهای که تایپ میشن!
نصب :
برای اجرای مثلا execsnoop
ویندوزیا عاشق 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
🎯 Most Useful
(With Emoji for Better Understanding)
# 1️⃣ Basic GET Request
Use
# 2️⃣ Save to a File
Use
# 3️⃣ Display Response Headers
Use
# 4️⃣ Follow Redirects
Use
# 5️⃣ Download a File (with Resume)
Use
# 6️⃣ Show Progress
Use
# 7️⃣ Download a Torrent
Use
# 8️⃣ Send a POST Request
Use
# 9️⃣ Include Custom Headers
Use
# 🔟 Make a PUT Request
Use
# 🔒 Send Data with Authentication
Use
# 1️⃣1️⃣ Save Cookies
Use
# 1️⃣2️⃣ Use Cookies from a File
Use
# 1️⃣3️⃣ Limit Download Speed
Use
# 1️⃣4️⃣ Show Full Request & Response
Use
# 1️⃣5️⃣ Send Data as JSON
Use
# 1️⃣6️⃣ Access a URL with SSL Verification Disabled
Use
# 1️⃣7️⃣ Limit Request Time
Use
# 1️⃣8️⃣ Download Multiple Files
Use
# 1️⃣9️⃣ Get Information About the URL
Use
# 2️⃣0️⃣ Use a Proxy
Use
🔖 Tags:
🔹 Share & Support Us 🔹
✉️ Channel : @ELITE_DRAGONS
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
Forwarded from Webinarfarsi | Soheib Kiani | وبینار فارسی
من کتاب مهندسی پرامپت گوگل که چند روزه وایرال شده رو به فارسی ترجمه کردم و گذاشتم روی گیتهاب.
کتاب خوبیه، سبکه و اصول اولیه و روشهای اصلی رو شرح داده و دستهبندی کرده و خواننده یه جورایی شیرفهم میشه که چطوری میشه پرامپت نوشت.
بخونین و به اشتراک بذارید
https://teal33t.github.io/prompt-engineering/
~ Saman
کتاب خوبیه، سبکه و اصول اولیه و روشهای اصلی رو شرح داده و دستهبندی کرده و خواننده یه جورایی شیرفهم میشه که چطوری میشه پرامپت نوشت.
بخونین و به اشتراک بذارید
https://teal33t.github.io/prompt-engineering/
~ Saman
teal33t.github.io
آموزش مهندسی پرامپت (Prompt Engineering)
Prompt Engineering گوگل با نکات و توضیحات اضافی برای درک بهتر مفاهیم مهندسی پرامپت.
👍1
Forwarded from Webinarfarsi | Soheib Kiani | وبینار فارسی
Linkedin
هشدار به برنامه نویس ها، بخصوص درباره پوزیشن های ریموت🚨
جدیدا دو بار… | Ali Sabzinezhad | 32 comments
جدیدا دو بار… | Ali Sabzinezhad | 32 comments
هشدار به برنامه نویس ها، بخصوص درباره پوزیشن های ریموت🚨
جدیدا دو بار برام پیش اومده که از طریق لینکدین پیام گرفتم با این مضمون که ما یه پوزیشن فول ریموت داریم، بیا اپلای کن. اینم یه پروژه MVP یا sample برای بررسی. سورس کد رو گذاشتیم روی Git یا Bitbucket،…
جدیدا دو بار برام پیش اومده که از طریق لینکدین پیام گرفتم با این مضمون که ما یه پوزیشن فول ریموت داریم، بیا اپلای کن. اینم یه پروژه MVP یا sample برای بررسی. سورس کد رو گذاشتیم روی Git یا Bitbucket،…
Forwarded from Linuxor ?
یه نفر تجربه 2 ساله خودش از استفاده از Rust رو نوشته، اگه میخواین تازه Rust یاد بگیرین خیلی جلوتون میندازه
borretti.me/article/two-years-of-rust
@Linuxor
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
از بخش A05:2021-Security-Misconfiguration در OWASP-TOP10
لینک ابزار معرفی شده :
https://github.com/arthaud/git-dumper
@Linuxor
Forwarded from Linuxor ?
دنبال انیمیشن Html Css برای Loading میگشتم اینو پیدا کردم توش کلی Loading های حوصله سر نبر داره از ساده بگیر تا آونگ و ماشین لباس شویی ...
cssloaders.github.io
@Linuxor
cssloaders.github.io
@Linuxor