This commit is contained in:
2025-12-20 18:46:45 +08:00
parent 5163e756f0
commit 547fd99c23
73 changed files with 15635 additions and 1924 deletions

View File

@@ -5,7 +5,7 @@ description: Here you will lean how to connect your namecheap domain to vercel d
image: /blogs-img/blog1.jpg
alt: How To Connect You Namecheap Domain With Vercel Deployed App
ogImage: /blogs-img/blog1.jpg
tags: ['namecheap', 'vercel']
tags: ["namecheap", "vercel"]
published: true
---

View File

@@ -5,7 +5,7 @@ description: In Nuxt3 project tailwind css intellisense doesn't seems to work pr
image: /blogs-img/blog2.jpg
alt: Hwo to fix tailwind intellisense in nuxt3 project
ogImage: /blogs-img/blog2.jpg
tags: ['nuxt', 'tailwindcss']
tags: ["nuxt", "tailwindcss"]
published: true
---

View File

@@ -5,7 +5,7 @@ description: Here we will learn, How To Create Namespace Subdomain & Connect To
image: /blogs-img/blog3.jpg
alt: How To Create Namespace Subdomain & Connect To Vercel App
ogImage: /blogs-img/blog3.jpg
tags: ['nuxt', 'vercel', 'namecheap']
tags: ["nuxt", "vercel", "namecheap"]
published: true
---

View File

@@ -5,7 +5,7 @@ description: Here we will learn How To Properly Fetch Nuxt Content Data and Rend
image: /blogs-img/blog4.jpg
alt: How To Properly Fetch Nuxt Content Data and Render It in Nuxt Pages
ogImage: /blogs-img/blog4.jpg
tags: ['nuxt', 'nuxt-content']
tags: ["nuxt", "nuxt-content"]
published: true
---
@@ -43,7 +43,7 @@ Once Nuxt Content v2 is configured, you can create content files in the specifie
```md
---
title: 'Hello, world!'
title: "Hello, world!"
---
# Welcome to Nuxt Content v2
@@ -59,8 +59,8 @@ Now that we have created content files, we can display the content on a page. To
```vue
<script setup lang="ts">
const { path } = useRoute()
const articles = await queryContent(path).findOne()
const { path } = useRoute();
const articles = await queryContent(path).findOne();
</script>
<template>

View File

@@ -5,7 +5,7 @@ description: Vue.js is a popular JavaScript framework for building web applicati
image: /blogs-img/blog5.jpg
alt: Some Awesome Libraries For Vue3
ogImage: /blogs-img/blog5.jpg
tags: ['vue', 'javascript']
tags: ["vue", "javascript"]
published: true
---

View File

@@ -5,7 +5,7 @@ description: In recent vue project we see that vuex type not working properly. W
image: /blogs-img/blog6.jpg
alt: How to fix vuex type issue
ogImage: /blogs-img/blog6.jpg
tags: ['vue', 'vuex']
tags: ["vue", "vuex"]
published: true
---
@@ -19,11 +19,11 @@ In recent version of our vue project, when we try to add vuex we see type error
2. Pase this code in that file
```ts
declare module 'vuex' {
export * from 'vuex/types/index.d.ts'
export * from 'vuex/types/helpers.d.ts'
export * from 'vuex/types/logger.d.ts'
export * from 'vuex/types/vue.d.ts'
declare module "vuex" {
export * from "vuex/types/index.d.ts";
export * from "vuex/types/helpers.d.ts";
export * from "vuex/types/logger.d.ts";
export * from "vuex/types/vue.d.ts";
}
```

View File

@@ -5,7 +5,7 @@ description: Recently, I ran into an interesting Redis case that taught me a big
image: /blogs-img/blog7.png
alt: Redis TTL, Jitter, and How I Almost Crashed a Server 🚀
ogImage: /blogs-img/blog7.png
tags: ['redis', 'ttl', 'jitter']
tags: ["redis", "ttl", "jitter"]
published: true
---
@@ -35,7 +35,7 @@ One day, I got the task:
Sounds easy, right? Just add:
```js
redis.set('mykey', value, 'EX', 1209600) // 2 weeks in seconds
redis.set("mykey", value, "EX", 1209600); // 2 weeks in seconds
```
Boom. Done. Task finished. Go get coffee. ☕
@@ -67,11 +67,11 @@ Instead of setting **exactly 2 weeks**, we add a little randomness (aka _jitter_
```js
// Expire between 14 and 16 days
const baseTTL = 14 * 24 * 60 * 60 // 14 days
const jitter = Math.floor(Math.random() * (2 * 24 * 60 * 60)) // up to 2 days
const ttl = baseTTL + jitter
const baseTTL = 14 * 24 * 60 * 60; // 14 days
const jitter = Math.floor(Math.random() * (2 * 24 * 60 * 60)); // up to 2 days
const ttl = baseTTL + jitter;
redis.set('mykey', value, 'EX', ttl)
redis.set("mykey", value, "EX", ttl);
```
Now some keys expire in **14 days**, some in **15**, some in **16**.

View File

@@ -5,7 +5,7 @@ description: Recently I got a task Alter a table column from `FLOAT` to `DECIMAL
image: /blogs-img/blog8.png
alt: FLOAT Made My Dollars Float Away - FLOAT vs DECIMAL in MySQL 💸
ogImage: /blogs-img/blog8.png
tags: ['mysql', 'float', 'decimal']
tags: ["mysql", "float", "decimal"]
published: true
---