Skip to content

Instantly share code, notes, and snippets.

@marina-mosti
marina-mosti / useEmptySlotCheck.js
Last active October 22, 2024 21:29
Vue 3 check for slot with no content
import { ref, computed, onBeforeUpdate, Comment, Fragment, Text, useSlots } from 'vue'
// Adapted from https://github.com/vuejs/vue-next/blob/ca17162e377e0a0bf3fae9d92d0fdcb32084a9fe/packages/runtime-core/src/helpers/renderSlot.ts#L77
// Demo: https://play.vuejs.org/#eNqVVm1P3EYQ/iuDU+UOdNiEa0NBHE2gRE1bJVWg/RJH1Z49PhvstbW7PkDX+++d2bV9vmCIggTa3Xl7ZuaZMSvvbVX5yxq9E+9URyqrDGg0dXUWyqyoSmXgoiwqSFRZwMgP+MLqo068AoXJBEp5jkmp8O8qFgYnUGu8ykujYd3YOqNQRqXUBgq9gBlbjke/ZTuj3Y3ElItFbm1JYbwLszMKEUpgE38p8hrpfXP+BWSd53AC1k8o16E8DVwilAJdDBZVTpDoBnDK+O0JYLWyKNZk4R46VXghRYFnaXYabFvb9K1busxrY0oJb6I8i25nobcBHnpnF/wIBZ4GTo2Mes68iWc0pZtkC/9Gl5KKv2KfoRdRgCxH9bEyGZUj9E7ASlgm8ry8+92+GVXjpH2PUoxuB95v9D2/hd5fCjWqJYZeJzNCLZCAsvjy6gPe07kTFmVc56T9jPAT6jKvGaNTO69lTLB7ehbte8uRTC6u9eW9QanbpBgoa66tfugRO7i2T6W+gTv1p9aOOk1VbOnI7N1ulWYCcRu5M6jJFoKehM9b3aXrMP2/j9+N0RX7uCwq88BKF9ygboQGZL3BYHSaGN76H9NoOMkKCK0z0hOIMckkxi2G2VDIsXVmZ2sb/riZK64HOy9z9PNyMXbl3oRxM7YdzL2xJjle0283btSPARBEcOrO88WkNhYozQTeKbFwp2ti3aPdEeztUeA9+BUNqoIgabhL0aSoQNjKQaYdfCD38A/th+k
This file has been truncated, but you can view the full file.
/9j/4Q5rRXhpZgAASUkqAAgAAAAPAAABAwABAAAAeAsAAAEBAwABAAAAYAkAAAIBAwADAAAAwgAAAAYBAwABAAAAAgAAAA4BAgAIAAAAyAAAAA8BAgAGAAAA0AAAABABAgAPAAAA1gAAABIBAwABAAAAAQAAABUBAwABAAAAAwAAABoBBQABAAAA5QAAABsBBQABAAAA7QAAACgBAwABAAAAAgAAADEBAgAeAAAA9QAAADIBAgAUAAAAEwEAAGmHBAABAAAAKAEAANgCAAAIAAgACABBdm9jYWRvAENhbm9uAENhbm9uIEVPUyA0NTBEAID8CgAQJwAAgPwKABAnAABBZG9iZSBQaG90b3Nob3AgQ1M2IChXaW5kb3dzKQAyMDE1OjA2OjA5IDA4OjAxOjAwAAAaAJqCBQABAAAAZgIAAJ2CBQABAAAAbgIAACKIAwABAAAAAQAAACeIAwABAAAAkAEAAACQBwAEAAAAMDIyMQOQAgAUAAAAdgIAAASQAgAUAAAAigIAAAGSCgABAAAAngIAAAKSBQABAAAApgIAAASSCgABAAAArgIAAAWSBQABAAAAtgIAAAeSAwABAAAAAgAAAAmSAwABAAAAEAAAAAqSBQABAAAAvgIAAJGSAgADAAAANzcAAJKSAgADAAAANzcAAAGgAwABAAAAAQAAAAKgBAABAAAAgAcAAAOgBAABAAAAOAQAAA6iBQABAAAAxgIAAA+iBQABAAAAzgIAABCiAwABAAAAAgAAAAGkAwABAAAAAAAAAAKkAwABAAAAAQAAAAOkAwABAAAAAAAAAAakAwABAAAAAAAAAAAAAAABAAAAyAAAAEcAAAAKAAAAMjAxMDoxMjoxMyAyMDoxNDo0MwAyMDEwOjEyOjEzIDIwOjE0OjQzANCidABAQg8AVkxWAEBCDwAAAAAAAQAAAK8AAABkAAAAMgAAAAEAAACAL0EAbgMAAAB1KwBIAgAAAAAGAAMBAwABAAAABgAAABoBBQABAAAAJgMAABsB
@marina-mosti
marina-mosti / gist:2d7a48cf72776ac98adf604171576a8b
Created February 14, 2019 04:07
Laravel Vue deploy sample
cd /var/www/html
git checkout -- .
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
php artisan config:cache
cd /var/www/html/frontend