HICTE Blog – Telegram
HICTE Blog
1.18K subscribers
382 photos
126 videos
8 files
616 links
گروهمون: @HicteGroup

دسته بندی پست‌ها: t.me/HicteBlog/743
Download Telegram
#سی

اگه حین یادگیری زبان C هستین و با دیدن چیزی مثل تصویر بالا تسمه تایم پاره کردین نگران نباشین.

میتونین برای توصیف declaration ها از این سایت استفاده کنین.

دوشواری نداریم 🤷‍♂.

🚁 Hicte Blog
👍8🤣4🔥1
HICTE Blog
#گوناگون چرا vscode یه هیستوری مجزا واسه شل ترمینالش نداره؟ الان بازش کردم و طبق عادت up arrow رو زدم و بعدش enter زدم. چی شد؟ سیستم ریبوت شد. 🚶‍♂ ادیت: راه حلش برای fish, bash, zsh [چون محتوا زیاد بود سه تا پست جدا نوشتم که لینک شده] 🚁 Hicte Blog
#نکته_لینوکس

خب برای اینکه برای vscode یه هیستوری مجزا داشته باشم مقادیر
"terminal.integrated.defaultProfile.linux": "vscfish",
"terminal.integrated.profiles.linux": {
        "vscfish": {
            "path": "fish",
            "args": [
                "-C",
                "set -x fish_history vscode"
            ]
        }
    }

رو به فایل
~/.config/Code/User/settings.json
اضافه کردم.

که توی بخش اول تنظیم میکنه ترمینال vscode از پروفایلی به اسم vscfish استفاده کنه.

بعدش vscfish رو به این صورت تعریف کردم که کامند fish رو با دو تا آرگومان اجرا کنه.
آرگومان اول که
-C
هست و معادل
--init-command
یه دستور مشخص رو بعد اینکه شل اجرا شد اجرا میکنه.
آرگومان دوم هم اون دستوری هست که میخوام موقع اجرا شدن شل اجرا بشه.
که با
set -x
مقدار متغیر fish_history رو به "vscode" تغییر دادم و یه session name جدید برای ذخیره‌ی history ایجاد کردم تا از history اصلی جدا بشه.

و از این به بعد هیستوری ترمینال vscode توی
~/.local/share/fish/history_vscode
ذخیره میشه.

مطالعه‌ی بیشتر:
VSCode Terminal Profiles
Fish shell fish_history
Fish shell --init-command

پی نوشت: من از شل fish استفاده میکنم؛ بعدا برای bash یه پست جداگانه مینویسم.

🚁 Hicte Blog
👍10
#گوناگون

الان که بازار برچسب «هوش مصنوعی» رو اسم هر چیزی داغه، کسی از «نانو» خبری نداره؟ نگرانش شدم! 🗿

اون قدیما تله تکست پر بود از اخبار نانو. 🚶‍♂

🚁 Hicte Blog
😭5👍4😁3
HICTE Blog
#نکته_لینوکس خب برای اینکه برای vscode یه هیستوری مجزا داشته باشم مقادیر "terminal.integrated.defaultProfile.linux": "vscfish", "terminal.integrated.profiles.linux": {         "vscfish": {             "path": "fish",             "args": [                …
#نکته_لینوکس

اگه از bash استفاده میکنین و میخواین هیستوری vscode مجزا باشه تقریبا مثل همون روال قبلی برای fish محتویات پایین رو به فایل settings.json اضافه کنین:
"terminal.integrated.defaultProfile.linux": "vscbash",
"terminal.integrated.profiles.linux": {
    "vscbash": {
        "path": "bash",
        "args": [
            "--init-file",
            "~/.vscbash.sh"
        ]
    }
}

حالا فایل
~/.vscbash.sh
رو به این صورت بنویسین:
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

export HISTFILE=~/.vscbash_history
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

که اول میاد bashrc رو اجرا میکنه و بعدش HISTFILE رو به فایل موردنظرمون تغییر میده.
خط آخر هم برای اینه که در لحظه هر کامندی که اجرا شد توی فایل هیستوری نوشته بشه تا اگه چندتا ترمینال باز داشتین کامندایی که تو یه ترمینال زدین همون لحظه تو ترمینال دیگه قابل دسترسی باشه. [میتونین این خط رو پاک کنین اگه بهش نیاز ندارین.]

ازین به بعد هیستوری مربوط به vscode توی فایل
~/.vscbash_history
جداگانه ذخیره میشه.

نکته۱: اگه میخواین برای هر پروژه هیستوری مجزا داشته باشین میتونین بجای اینکه یه مسیر ثابت برای vscbash_history مشخص کنین، با $(pwd) مسیر پوشه‌ای که vscode باز کرده رو بهش بدین تا فایل اونجا ایجاد بشه و هر working directory برای vscode یه هیستوری مجزا داشته باشه.

نکته۲: اگه نکته۱ رو اجرا کردین میتونین
"files.exclude": {
".vscbash_history": true
}

رو به settings.json اضافه کنین تا فایل هیستوری توی File Explorer تو vscode براتون نشون داده نشه.

🚁 Hicte Blog
👍8🙏1
HICTE Blog
#نکته_لینوکس اگه از bash استفاده میکنین و میخواین هیستوری vscode مجزا باشه تقریبا مثل همون روال قبلی برای fish محتویات پایین رو به فایل settings.json اضافه کنین: "terminal.integrated.defaultProfile.linux": "vscbash", "terminal.integrated.profiles.linux":…
#نکته_لینوکس

اگه از zsh استفاده میکنین و میخواین هیستوری مجزا داشته باشین کامند:
printenv TERM_PROGRAM

رو توی ترمینال vscode بزنین و ببینین خروجیش چیه. فرض میکنیم خروجیش
vscode
باشه.
حالا توی فایل zshrc بجای
HISTFILE=~/.histfile
بنویسین:
if [[ $TERM_PROGRAM = "vscode" ]]; then
    HISTFILE=~/.vsczsh_history
else
    HISTFILE=~/.histfile
fi

و ازین به بعد هیستوری vscode توی
~/.vsczsh_history
ذخیره میشه.

پی‌نوشت: نهایتا راه های رسیدن به خدا زیاده برای bash هم میتونین روشی مثل این رو انتخاب کنین یا یه روش دیگه که توی کامنت پست قبل هست.

🚁 Hicte Blog
👍4
😁11👍5🤣2
#کتاب

Dive Into DESIGN PATTERNS

Author:  Alexander Shvets
Edition: 1st
Date: 2019
Publisher: Refactoring.Guru
Length: 409 pages


Official Website 👀
Download 😉

🚁 Hicte Blog
👍3
HICTE Blog
#کتاب Dive Into DESIGN PATTERNS Author:  Alexander Shvets Edition: 1st Date: 2019 Publisher: Refactoring.Guru Length: 409 pages Official Website 👀 Download 😉 🚁 Hicte Blog
توضیحات:

An ebook on design patterns and the principles behind them

Design patterns help you solve commonly-occurring problems in software design. But you can’t just find a pattern and copy it into your program, the way you can with off-the-shelf functions or libraries. A pattern is not a specific piece of code, but a general concept for solving a particular problem. They are like pre-made blueprints that you can customize to solve a recurring design problem in your code.

The book Dive Into Design Patterns illustrates 22 classic design patterns, and 8 design principles that these patterns are based on.

    Each chapter starts with a real-world software design problem, then solves it using one of the patterns.
   
    Then we dive into a detailed review of the pattern's structure and its variations, followed by a code example.
   
    Then the book shows various applications of the pattern and teaches how to implement the pattern step by step, even in an existing program.
   
    Each chapter concludes with a discussion of pros and cons of the pattern and explores its relations to, similarities with and differences from other patterns.

Why do you need to know patterns?

    Ace interviews and reviews. Questions about patterns come up at almost every programming job interview and every performance review. Get more jobs and get that raise and promotion you so richly deserve.

    Extend your programming toolkit. Patterns let you customize ready-made solutions rather than reinvent the wheel. Your code has fewer mistakes because you are using a proven, standard solution covering all hidden problems.

    Communicate better with colleagues. Just share the name of the pattern rather than wasting an hour explaining the details of your cool design and its classes to other programmers. Get the glory without the sweat.

Who is this book for?

    Pattern Beginners. If you have never studied patterns, the book explains the basic principles of object-oriented programming with real-life examples. Before diving into the patterns, we look at the design values and principles on which the patterns are built.

    Pattern Refreshers. If you studied patterns a while ago, but have forgotten things, the ebook can refresh your memory as serve as a handy reference. Quickly find sections of interest without having to read it from start to finish.

    Language Switchers. If you are switching to one of the OOP languages (C#, C++, Go, Java, PHP, Python, Ruby, Rust, Swift, or TypeScript), you will easily grasp the essence of the text thanks to the many real-world examples and analogies, supported by helpful illustrations and diagrams.
#ابزار_لینوکس

احتمالا اسم neofetch و fastfetch و ... رو شنیدید که میان اطلاعات سیستم رو توی ترمینال نشون میدن.

یه onefetch هم داریم که اطلاعات ریپازیتوری گیت رو به این صورت نشون میده چیز باحالیه خواستید تستش کنید.

برای نصب و استفاده یه سر به ویکی گیت هابش بزنید:
https://github.com/o2sh/onefetch/wiki/installation

🚁 Hicte Blog <~ @CleverDevs
👍14🔥1
#کتاب

Linux Bible

Author: Christopher Negus
Edition: 10th
Date: June 2020
Publisher: Wiley
Length: 928 pages


Amazon 👀
Download 😉

🚁 Hicte Blog
👍2🔥2
HICTE Blog
#کتاب Linux Bible Author: Christopher Negus Edition: 10th Date: June 2020 Publisher: Wiley Length: 928 pages Amazon 👀 Download 😉 🚁 Hicte Blog
توضیحات:

The industry favorite Linux guide

Linux Bible, 10th Edition is the ultimate hands-on Linux user guide, whether you're a true beginner or a more advanced user navigating recent changes. this updated tenth edition covers the latest versions of Red Hat Enterprise Linux (RHEL 8), Fedora 30, and Ubuntu 18.04 LTS. It includes information on cloud computing, with new guidance on containerization, Ansible automation, and Kubernetes and OpenShift. With a focus on RHEL 8, this new edition teaches techniques for managing storage, users, and security, while emphasizing simplified administrative techniques with Cockpit. Written by a Red Hat expert, this book provides the clear explanations and step-by-step instructions that demystify Linux and bring the new features seamlessly into your workflow.

This useful guide assumes a base of little or no Linux knowledge, and takes you step by step through what you need to know to get the job done.

    Get Linux up and running quickly
    Master basic operations and tackle more advanced tasks
    Get up to date on the recent changes to Linux server system management
    Bring Linux to the cloud using Openstack and Cloudforms
    Simplified Linux administration through the Cockpit Web Interface
    Automated Linux Deployment with Ansible
    Learn to navigate Linux with Amazon (AWS), Google (GCE), and Microsofr Azure Cloud services

Linux Bible, 10th Edition is the one resource you need, and provides the hands-on training that gets you on track in a flash.
👍7😁7👨‍💻1
#میم

میگن به تن ماهی هم حساسیت پیدا کرده 🐳

🚁 Hicte Blog
😁9🤣4🐳3🗿1
#کتاب

21st Century C: C Tips from the New School

Author: Ben Klemens
Edition: 2nd
Date: November 2014
Publisher: O'Reilly Media
Length: 406 pages


Amazon 👀
Download 😉

🚁 Hicte Blog
🔥6👍1
HICTE Blog
#کتاب 21st Century C: C Tips from the New School Author: Ben Klemens Edition: 2nd Date: November 2014 Publisher: O'Reilly Media Length: 406 pages Amazon 👀 Download 😉 🚁 Hicte Blog
توضیحات:

Throw out your old ideas about C and get to know a programming language that’s substantially outgrown its origins. With this revised edition of 21st Century C, you’ll discover up-to-date techniques missing from other C tutorials, whether you’re new to the language or just getting reacquainted.

C isn’t just the foundation of modern programming languages; it is a modern language, ideal for writing efficient, state-of-the-art applications. Get past idioms that made sense on mainframes and learn the tools you need to work with this evolved and aggressively simple language. No matter what programming language you currently favor, you’ll quickly see that 21st century C rocks.

    Set up a C programming environment with shell facilities, makefiles, text editors, debuggers, and memory checkers
    Use Autotools, C’s de facto cross-platform package manager
    Learn about the problematic C concepts too useful to discard
    Solve C’s string-building problems with C-standard functions
    Use modern syntactic features for functions that take structured inputs
    Build high-level, object-based libraries and programs
    Perform advanced math, talk to internet servers, and run databases with existing C libraries

This edition also includes new material on concurrent threads, virtual tables, C99 numeric types, and other features.
👍1
#کتاب

The Art of Computer Programming

Author: Donald Knuth
Edition: Vol.1 3rd, Vol.2 3rd, Vol.3 2nd, Vol.4A 1st, Vol.4B 1st
Date: 1997-2022
Publisher: Addison-Wesley Professional
Length: Vol.1 677, Vol.2 782, Vol.3 803, Vol.4A 901, Vol.4B 734 (pages
)

Amazon 👀
Download 😉
{
Volume 1
Volume 2
Volume 3
Volume 4A
Volume 4B
}

Wikipedia 👈 [for more details]

🚁 Hicte Blog
🤯21👍1
HICTE Blog
#کتاب The Art of Computer Programming Author: Donald Knuth Edition: Vol.1 3rd, Vol.2 3rd, Vol.3 2nd, Vol.4A 1st, Vol.4B 1st Date: 1997-2022 Publisher: Addison-Wesley Professional Length: Vol.1 677, Vol.2 782, Vol.3 803, Vol.4A 901, Vol.4B 734 (pages) Amazon…
توضیحات:

The bible of all fundamental algorithms and the work that taught many of today’s software developers most of what they know about computer programming.

Volume 1 – Fundamental algorithms
        Chapter 1 – Basic concepts
        Chapter 2 – Information
structures

Volume 2 – Seminumerical algorithms
        Chapter 3 – Random numbers
        Chapter 4 – Arithmetic


Volume 3 – Sorting and searching
        Chapter 5 – Sorting
        Chapter 6 – Searching


Volume 4A – Combinatorial algorithms
        Chapter 7 – Combinatorial searching (part 1)

Volume 4B – Combinatorial algorithms
        Chapter 7 – Combinatorial searching (part 2)

Countless readers have spoken about the profound personal influence of Knuth's work. Scientists have marveled at the beauty and elegance of his analysis, while ordinary programmers have successfully applied his "cookbook" solutions to their day-to-day problems. All have admired Knuth for the breadth, clarity, accuracy, and good humor found in his books.

Primarily written as a reference, some people have nevertheless found it possible and interesting to read each volume from beginning to end. A programmer in China even compared the experience to reading a poem. Whatever your background, if you need to do any serious computer programming, you will find your own good reason to make each volume in this series a readily accessible part of your scholarly or professional library.
👍1
😁16🤣2
#کتاب

Secure Coding in C and C++

Author: Robert C. Seacord
Edition: 2nd
Date: April 2013
Publisher: Addison-Wesley Professional
Length: 608 pages


Amazon 👀
Download 😉

🚁 Hicte Blog
🔥2👍1
HICTE Blog
#کتاب Secure Coding in C and C++ Author: Robert C. Seacord Edition: 2nd Date: April 2013 Publisher: Addison-Wesley Professional Length: 608 pages Amazon 👀 Download 😉 🚁 Hicte Blog
توضیحات:

Learn the Root Causes of Software Vulnerabilities and How to Avoid Them

Commonly exploited software vulnerabilities are usually caused by avoidable software defects. Having analyzed tens of thousands of vulnerability reports since 1988, CERT has determined that a relatively small number of root causes account for most of the vulnerabilities.

Secure Coding in C and C++, Second Edition, identifies and explains these root causes and shows the steps that can be taken to prevent exploitation. Moreover, this book encourages programmers to adopt security best practices and to develop a security mindset that can help protect software from tomorrow’s attacks, not just today’s. Drawing on the CERT’s reports and conclusions, Robert C. Seacord systematically identifies the program errors most likely to lead to security breaches, shows how they can be exploited, reviews the potential consequences, and presents secure alternatives.

Coverage includes technical detail on how to

    Improve the overall security of any C or C++ application
    Thwart buffer overflows, stack-smashing, and return-oriented programming attacks that exploit insecure string manipulation logic
    Avoid vulnerabilities and security flaws resulting from the incorrect use of dynamic memory management functions
    Eliminate integer-related problems resulting from signed integer overflows, unsigned integer wrapping, and truncation errors
    Perform secure I/O, avoiding file system vulnerabilities
    Correctly use formatted output functions without introducing format-string vulnerabilities
    Avoid race conditions and other exploitable vulnerabilities while developing concurrent code

The second edition features

    Updates for C11 and C++11
    Significant revisions to chapters on strings, dynamic memory management, and integer security
    A new chapter on concurrency
    Access to the online secure coding course offered through Carnegie Mellon’s Open Learning Initiative (OLI)

Secure Coding in C and C++, Second Edition, presents hundreds of examples of secure code, insecure code, and exploits, implemented for Windows and Linux. If you’re responsible for creating secure C or C++ software–or for keeping it safe–no other book offers you this much detailed, expert assistance.