Skip to content

Instantly share code, notes, and snippets.

View Bazsmagister's full-sized avatar
๐ŸŽฏ
Focusing

Bazsmagister

๐ŸŽฏ
Focusing
View GitHub Profile
@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
@Bazsmagister
Bazsmagister / gitignore repair.txt
Created February 6, 2021 17:33
.gitignore doesn't work
https://stackoverflow.com/questions/25436312/gitignore-not-working
"The files/folder in your version control will not just delete themselves just because you added them to the .gitignore. They are already in the repository and you have to remove them. You can just do that with this:
(Remember to commit everything you've changed before you do this.)
git rm -rf --cached .
git add .
This removes all files from the repository and adds them back (this time respecting the rules in your .gitignore)."
@Bazsmagister
Bazsmagister / dockerOnWindows.txt
Created January 1, 2021 12:01
docker and docker desktop in win10
Download docker desktop.
https://www.docker.com/products/docker-desktop
Install it!
update wsl to wsl 2!
https://docs.microsoft.com/hu-hu/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package
@Bazsmagister
Bazsmagister / gist:a668e1aa4203cbe42196ee2f3c2320d7
Created December 26, 2020 19:07 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@Bazsmagister
Bazsmagister / docker_portainer_volumes_bind_mounts.txt
Last active July 4, 2024 08:39
docker on linux mint (19.3), and add Portainer, docker-volumes, bind mounts
docker:
https://docs.docker.com/engine/install/ubuntu/
`sudo apt-get remove docker docker-engine docker.io containerd runc`
`sudo apt-get update`
`sudo apt-get install \
apt-transport-https \
ca-certificates \
@Bazsmagister
Bazsmagister / renamer.py
Created November 5, 2020 09:08
python file renamer in a folder, new names are come from a list
import glob
import os
listOfNames=['anything','banything',"canithing"]
files = glob.glob("*.???")
files.sort(key=os.path.getmtime)
for filename, newname in zip(files, listOfNames):
@Bazsmagister
Bazsmagister / zsh and oh-my-zsh on ubuntu and on linuxmint.txt
Last active May 16, 2024 15:54
zsh and oh-my-zsh usage on ubuntu and linuxmint
source:
https://www.tecmint.com/install-zsh-in-ubuntu/
---
sudo apt install zsh
zsh --version
---
//current shell:
echo $SHELL
---
//change shell:
@Bazsmagister
Bazsmagister / 2020_10_22_071916_change_collation-to_utf8.php
Last active October 22, 2020 07:40
change laravel charset and collation from utf8mb4 to utf8 and utf8mb4_unicode_ci to utf8_unicode_ci. Idea is from here: @NBZ4live NBZ4live / 2018_02_07_101510_migrate_to_utf8mb4.php
<?php
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeCollationToUtf8 extends Migration
{
/**