Skip to content

Instantly share code, notes, and snippets.

View brocard's full-sized avatar
🏠
Working from home...

Yusniel Brocard brocard

🏠
Working from home...
View GitHub Profile
@adamwathan
adamwathan / v-cloak.md
Last active November 6, 2024 14:28
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@tomysmile
tomysmile / mac-setup-redis.md
Last active May 5, 2025 13:06
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@zolotyx
zolotyx / auth.js
Last active March 6, 2023 06:06
Nuxt Auth Redirect Fix
export const isSameURL = (a, b) => a.split('?')[0] === b.split('?')[0]
export const isRelativeURL = u =>
u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[?]?([^#]*)#?([^#]*)$/.test(u)
export default function ({ app }) {
const redirect = function (name, noRouter = false) {
if (!this.options.redirect) {
return
}
@Bunix
Bunix / vue-datatable.md
Created September 11, 2020 14:37
Datatable component for Vue and Tailwind CSS

Keep in mind that this implementation requires an api for fetching data, and assumes the following response schema:

{
    "perPageOptions": [
        15, 50, 100
    ],
    "actions": [
        "Delete all", "Publish All", "Unpublish All"
    ],
@danielroe
danielroe / extensions.json
Last active June 2, 2025 10:10
VScode settings for a minimal UI
{
"recommendations": [
"aaron-bond.better-comments",
"adrieankhisbe.vscode-ndjson",
"johnsoncodehk.vscode-tsconfig-helper",
"rbuckton.deoptexplorer-vscode",
"helixquar.randomeverything",
"WallabyJs.quokka-vscode",
"bierner.comment-tagged-templates",
"alexcvzz.vscode-sqlite",