Mira
735 subscribers
802 photos
25 videos
20 files
263 links
sporadic attempts at cybersec.
personal channel.

files: @mira_files
playlist: @the_coding_playlist
Download Telegram
Her: I like animals
me: my mom calls me a dog

stay tuned for more flirting tips 😭
😁7🀣3
Don't let other's opinion to be your reality


like, u know, people tend to have rough opinions and negative outlooks on other people (especially if you're different from them and surround yourself with negative people just for the sake of fitting in). tbh most people try to fit in while they were destined to stand out. you're unique on your own way; you don't have to need for someone's approval to have awesome life
❀4
some contributions require a conventional commit messages to help maintain a clear and organized commit history. some of them defined by Conventional Commits, and i found useful:

- feat: Introduces a new feature to the application.

- fix: Patches a bug or addresses an issue in the code.

- chore: categorizes changes that do not directly affect the application's functionality or fix bugs

- docs: Documentation-only changes that do not affect the code.

- style: Changes that do not affect the meaning of the code, such as formatting, whitespace, or missing semicolons.

- refactor: Code changes that neither fix a bug nor add a feature, focusing on improving the code structure.

- perf: Changes that improve performance, making the application faster or more efficient.

- test: Adds missing tests or corrects existing tests to ensure code quality.

- build: Changes that affect the build system or external dependencies (e.g., gulp, npm).

- ci: Changes related to continuous integration configuration files and scripts.

- revert: Reverts a previous commit, indicating that a change is being undone.

#tips #git
πŸ‘3❀1
have a blessed day y'all
❀7
Aceternity UI has some bugs in few components I used. like for example the Card-with-hover-effect takes array of objects with title, description and link property. then uses the link prop for the key. if you have an object with the same link prop, it throws an error. since it has hover event, there will be lots of console errors which isn't good for the overall performance. instead, they can use the index of the object being mapped as the key since the index is always unique in this context. other bugs i noticed is, some components have validDOMNesting warning, meaning for instance <h1> or <h2> cannot appear as a descendant of <p> or <h3>.
πŸ‘2
A little copying is better than a little dependency.


this is actually one of the wisdom words from Rob Pike (one of Golang's creator). it is all about simplicity vs. reusability. still a dependency is crucial but sometimes dependencies pose some risks like:

Increased build times: Larger projects take longer to compile.
Introducing security vulnerabilities: Outdated or compromised libraries pose risks.
Make your code harder to understand: You might not know how the library works internally.

In Go's minimalist philosophy, sometimes a few lines of copied code are easier to manage than a complex external library. This is especially true for small, self-contained functions or utility code.

Weigh the benefits of reusing code against the potential downsides of adding dependencies. In Go, simplicity often wins! that is why something like generics weren't supported till Go's version 1.2

#tips #golang
πŸ”₯2
😁4
πŸ’―4
in Go, to format Error strings use fmt.Errorf or fmt.Sprintf to create error strings that are clear, concise, and informative. Include relevant details, such as the operation that failed or the specific values involved.

func openFile(filename string) (io.Reader, error) {
file, err := os.Open(filename)
if err != nil {
return nil, fmt.Errorf("failed to open file %s: %w", filename, err) // Wrap the error with context
}
return file, nil
}

handling errors properly really saves debugging times

#tips #golang
This media is not supported in your browser
VIEW IN TELEGRAM
what people do with AI 🀦
🀣5πŸ”₯1
A sniper’s dream FINAL VERSION || Khapiter.boy.s
MegaSaverBot
here's the full version of the song btw πŸ—Ώ AI song artists be rocking
😁1
A constant struggle, a ceaseless battle to bring success from inhospitable surroundings, is the price of all great achievements.


have a great day y'all ✌️
❀1
❀3
ForwardingServiceRepositoryImpl (Archive)
She did it
ofc congrats to Jo. this guy is the reason i started a channel. he and @gugutlogs finally made it πŸ™Œ
πŸ”₯11
hey mates πŸ‘‹ so i've been working on a site where anyone can learn and reference Golang materials. Here's the site link:

https://gopher-notes.netlify.app/

Gopher Notes is an archive of Go notes from different resources. I reviewed and edited each part so that the material is up-to-date.

Features:

- Clear and Concise Notes: so you actually retain the info (no more forgetting what a 'defer' statement does lol)
- Exercises that'll test your coding skills
- Bookmark Feature that'll let you bookmark any topic
- Wrapping Up Sections: Additionally, I included this section for every topic that is covered.

If you're starting out in Go or want quick references, check it out. Plus it's totally open-source (giving it a star is appreciated lol). Let's build some awesome Go stuff together! πŸ—

[GitHub Repo]

#MyProjects #GopherNotes #golang #resources
πŸ”₯27πŸ‘2
make nested conditionals one-dimensional! use early returns from a function rather than if/else chains. this is essential not only in the aspect of Go, but also in any language.

take a look at the following code snippet:

func isValidPassword(password string) bool {
isValid := true
if len(password) < 8 {
isValid = false
} else {
if !containsUppercase(password) {
isValid = false
} else {
if !containsLowercase(password) {
isValid = false
} else {
if !containsNumber(password) {
isValid = false
}
}
}
}
return isValid
}

func containsUppercase(str string) bool {
// ... implementation ...
}

func containsLowercase(str string) bool {
// ... implementation ...
}

func containsNumber(str string) bool {
// ... implementation ...
}

the above code adds cognitive load for someone who's reading ur code (the number of entities they need to think about is a lot, so they might be lost in ur code).

but take a look at the more idiomatic approach to the code:

func isValidPassword(password string) bool {
if len(password) < 8 {
return false
}
if !containsUppercase(password) {
return false
}
if !containsLowercase(password) {
return false
}
if !containsNumber(password) {
return false
}
return true
}

func containsUppercase(str string) bool {
// ... implementation ...
}

func containsLowercase(str string) bool {
// ... implementation ...
}

func containsNumber(str string) bool {
// ... implementation ...
}


it uses early returns (guard clauses) and provide a linear approach to logic trees

#tips #code
@Mi_Ra_Ch