Skip to content

Instantly share code, notes, and snippets.

@lucacicada
lucacicada / page.vue
Last active July 2, 2026 06:46
Nuxt infer response type, type Inference in Nuxt API Routes
<script setup lang="ts">
import type { FetchResult } from '#app'
type Data = FetchResult<'/api/something', 'get'>
const { data } = await useFetch('/api/something')
</script>
@lucacicada
lucacicada / tailwind.config.ts
Created May 8, 2024 13:38
Tailwindcss Shadcn Prose
import type { Config } from 'tailwindcss'
import typography from '@tailwindcss/typography'
export default <Partial<Config>>{
theme: {
extend: {
typography: {
DEFAULT: {
css: {
'--tw-prose-body': 'hsl(var(--foreground))',
func get_all_files(path: String, file_ext := "", files := []):
var dir = Directory.new()
if dir.open(path) == OK:
dir.list_dir_begin(true, true)
var file_name = dir.get_next()
while file_name != "":
if dir.current_is_dir():