Skip to content

Instantly share code, notes, and snippets.

View Bazsmagister's full-sized avatar
🎯
Focusing

Bazsmagister

🎯
Focusing
View GitHub Profile
@Bazsmagister
Bazsmagister / in_gitattributes_text_auto.txt
Last active July 18, 2024 08:48
What does in .gitattributes * text=auto
// Auto detect text files and perform LF normalization
* text=auto
In a .gitattributes file, setting `text=auto` means that the path is marked for automatic end-of-line normalization.
If Git decides that the content is text, its line endings are normalized to LF on check-in.
This setting allows fine-grained control over how line endings are converted.
https://stackoverflow.com/questions/21472971/what-is-the-purpose-of-text-auto-in-gitattributes-file
from that SO question:
@Bazsmagister
Bazsmagister / german_keyboard_layout.txt
Created July 18, 2024 08:27
German umlauts and es-zett(sharfes s, sharp s) character on linux mint with german language keyboard layout.
System Settings -> Keyboard -> Layouts
Add a layout with the plus sign, and select the German language from the list.
Then you have a little flag icon in the system tray. (if in the options there are enabled using country flaf)
Now with a simple click You can toggle between your favourite lanuages.
You can check the Character Table, if you click on the language flag on the tray,
and click 'Show Character Table'.
@Bazsmagister
Bazsmagister / last_git_commit.md
Last active July 14, 2024 08:49
How to check last git commit?
@Bazsmagister
Bazsmagister / toRef_vs_toRefs.txt
Created July 9, 2024 06:20
vu3 toRef() vs toRefs()
https://vuejs.org/api/reactivity-utilities.html#toref
https://vuejs.org/api/reactivity-utilities.html#torefs
In Vue 3, both toRef() and toRefs() are part of the Composition API and serve different purposes:
toRef():
Converts a single reactive object property to a ref that maintains its connection with the parent object.
Example:
@Bazsmagister
Bazsmagister / php8.md
Last active June 27, 2024 08:42
php8_features

https://php.watch/versions

PHP 8.0

https://www.php.net/releases/8.0/en.php

It contains many new features and optimizations including named arguments, union types, attributes, constructor property promotion, match expression, nullsafe operator, JIT, and improvements in the type system, error handling, and consistency.

  1. Named Arguments: You can now specify only required parameters, skipping optional ones. Arguments are order-independent and self-documented.
  2. Attributes: Instead of PHPDoc annotations, you can use structured metadata with PHP’s native syntax.
@Bazsmagister
Bazsmagister / laravel_octane.txt
Created June 27, 2024 08:10
laravel vs laravel octane
Laravel is a popular PHP web application framework known for its elegant syntax, expressive features, and robust ecosystem.
It provides tools for routing, database interaction, authentication, and more, making it easier to build web applications.
Laravel Octane, on the other hand, is an open-source package that enhances Laravel’s performance.
https://laravel.com/docs/11.x/octane
Here are the key differences:
Performance:
@Bazsmagister
Bazsmagister / mint_hardver_commands.md
Last active June 26, 2024 11:12
linux mint hardver progs and terminal commands

cpu-x (like cpu-z)

inxi -F

lshw -class disk -class storage

sudo dmidecode --type slot

@Bazsmagister
Bazsmagister / ref_vs_reactive
Created September 20, 2023 18:12
ref() vs reactive() in Vue3
In Vue 3, both ref() and reactive() are used for creating reactive data, but they have some differences in how they work and what kind of data they are best suited for.
ref():
Atomic Values: ref() is primarily used for creating reactive references to atomic values, such as numbers, strings, booleans, or any other single non-object value.
Unwrapping: When you access a value created with ref(), you need to explicitly use the .value property to access the underlying value. This is because ref() wraps the value in an object to make it reactive.
Use Cases: Use ref() for simple, individual values that need reactivity. For example, you might use ref() for a numeric counter, a string message, or a boolean flag.
@Bazsmagister
Bazsmagister / node_npm_nvm.advice
Last active July 4, 2024 18:00
Node, npm nvm advices
nvm github:
https://github.com/nvm-sh/nvm
install nvm (node version manager)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
list available node versions:
nvm ls-remote
then select one, and install:

Install Zsh and Oh-my-zsh on CentOS 7

Based on this article

ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does

yum install zsh -y
chsh -s /bin/zsh root