Skip to content

Instantly share code, notes, and snippets.

View Bazsmagister's full-sized avatar
🎯
Focusing

Bazsmagister

🎯
Focusing
View GitHub Profile
@Bazsmagister
Bazsmagister / Laravel_base_workflow.txt
Last active July 7, 2023 00:04
Laravel base workflow
CREATE AN APP
1.a
laravel new APPNAME
1.b: or:
composer create-project laravel/laravel APPNAME
cmd:
cd name-of-your-project
php artisan -v
@Bazsmagister
Bazsmagister / MySQL_linux
Created February 28, 2020 08:07
MySQL on linux in case of some problems
Login as root first:
$ sudo mysql -u root
Then CREATE or ALTER a non-root user (use '127.0.0.1' instead of 'localhost' if needed):
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'adminspassword';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost';
FLUSH PRIVILEGES;
Exit and restart:
@Bazsmagister
Bazsmagister / uninstalling_mysql_from_linuxmint.txt
Created March 1, 2020 08:45
uninstalling_mysql_from_linuxmint
Use apt to uninstall and remove all MySQL packages:
$ sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
$ sudo apt-get autoremove -y
$ sudo apt-get autoclean
Remove the MySQL folder:
$ rm -rf /etc/mysql
@Bazsmagister
Bazsmagister / Vue_base_workflow.txt
Last active October 8, 2020 13:39
Vue_base_workflow
Alone in html5 file
In a html file add a CDN link.:
https://vuejs.org/v2/guide/installation.html#CDN
For prototyping or learning purposes, you can use the latest version with:
In the head section of the html. If I put at the bottom of the body, it doesn't work.
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions:
@Bazsmagister
Bazsmagister / LinuxMint19.3Tricia_PHP_MySQL_Composer_Laravel.md
Last active December 27, 2020 19:25
LinuxMint19.3Tricia_PHP_MySQL_Composer_Laravel install

General

sudo apt update

sudo apt upgrade

//sudo apt show php
//sudo apt-cache depends php
//sudo apt-cache policy php7.2-cli

PHP

sudo apt install php

@Bazsmagister
Bazsmagister / linux_fun.md
Last active January 10, 2021 19:45
Linux fun progs on the internet. Just for fun!

Some linux fun progs, which I have found on the net:

sl

//a train goes thorough the screen

sudo apt install sl

oneko

sudo apt install oneko

@Bazsmagister
Bazsmagister / fetch-api-examples.md
Created May 20, 2020 08:21 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
@Bazsmagister
Bazsmagister / listen_query.txt
Last active April 12, 2021 07:21
laravel query var_dumper
DB::listen(function ($query) {
var_dump($query->sql, $query->bindings);
});
----
source:
https://stackoverflow.com/questions/27753868/how-to-get-the-query-executed-in-laravel-5-dbgetquerylog-returning-empty-ar
You will need to enable the query log by calling:
@Bazsmagister
Bazsmagister / PHP_update_from_PPA.txt
Last active June 27, 2024 13:05
PHP update from PPA on LinuxMint19.3
Source is:
https://computingforgeeks.com/how-to-install-php-7-3-php-7-3-fpm-on-linux-mint-19/
sudo apt update
sudo apt upgrade
sudo add-apt-repository ppa:ondrej/php
sudo apt update
---
@Bazsmagister
Bazsmagister / months.js
Created June 3, 2020 17:46
JS months in array
let month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
let monthLong = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November',
'December'];