Skip to content

Instantly share code, notes, and snippets.

Vue 3x composables in the global namespace

#COMPOSABLE #GLOBAL #VUE3

Warning: This is just an exploration and not a best practice! To better understand the concept, read about Composables in the Vue documentation.

Composables are usually component-scoped. That means you cannot invoke the composable function in two separate components and have the composable variables in sync. However, for limited use cases, you can use the provide-inject functions in Vue 3x to create singletons of your composables accessible everywhere.

The factory function bellow is only required when you want to provide arguments to your composables before placing them in the memory of the provide function.

@geovra
geovra / video.md
Last active December 7, 2021 19:05
Video
@geovra
geovra / gist:fa4aae649747604316d59ee901559b18
Last active October 26, 2021 16:28
Error on deploying Laravel project to Heroku using Git

Error on deploying Laravel project to Heroku using Git

#laravel, #storage, #heroku, #git

Please provide a valid cache path

rm -rf public/storage # // Optional: Undo the effect of: $ php artisan storage:link; This links to storage/app/public and can be deleted. 

mkdir -p bootstrap/cache storage/framework/{sessions,views,cache}

Laravel 8 with Sanctum and browser XDEBUG

laravel8, sanctum, rest, api, authorization, bearer, browser, firefox, xdebug, vscode

 
For browser (Firefox) install xdebug-helper.

 
Make a GET request to you API endpoint. By default, Laravel expect a header similar to: "Authorization: Bearer 9CvU9j...0A", which is the reason behind the 403 status.

@geovra
geovra / findings.md
Last active December 25, 2022 12:22

0 = ANDROID, 1 = WEB

100 ......... admin, dashboard, 030
109 ......... hz menu, tabs, 039
108 ......... timeline, activity, 038
107 ......... profile
106 ......... table, list
105 ......... messaging
103 ......... todo
102 ......... block

@geovra
geovra / media.md
Last active July 14, 2022 21:04
Music links

#TLDR

https://gogoanime.lu/shikkakumon-no-saikyou-kenja-episode-12
https://gogoanime.lu/youkoso-jitsuryoku-shijou-shugi-no-kyoushitsu-e-tv-2nd-season-episode-1
Star.Trek.Strange.New.Worlds.S01E02.WEBRip.x264-ION10
The.Time.Travelers.Wife.S01E01.WEBRip.x264-TORRENTGALAXY[TGx]
Moon.Knight.S01E02.720p.WEBRip.x265-MiNX[TGx]
Halo.S01E04.WEB.x264-TORRENTGALAXY[TGx]
The.Endgame.S01E06.WEB.x264-TORRENTGALAXY[TGx]
Tokyo.Vice.S01E08.720p.WEB.x265-MiNX[TGx]
Corrective.Measures.2022.720p.WEBRip.800MB.x264-GalaxyRG[TGx]