Skip to content

Instantly share code, notes, and snippets.

View davidparys's full-sized avatar
🎯
Focusing

David Parys davidparys

🎯
Focusing
View GitHub Profile
@davidparys
davidparys / setup.py
Created May 29, 2025 18:18
Create a OVH email profile for iPhone and MacOS (IMAP)
#!/usr/bin/env python3
"""
OVHcloud MX Plan macOS Mail Configuration Generator
This script generates a macOS configuration profile (.mobileconfig) file
that automatically configures OVHcloud MX Plan email settings in the macOS Mail app.
Usage:
python ovh_macos_email_config_generator.py
<!-- invoice -->
<html>
<head>
<link href='https://my.sevdesk.de/assets/fonts/OpenSans.css' rel='stylesheet' type='text/css'>
<style>
@font-face {
font-family: 'ocrb';
src: url('https://my.sevdesk.de/assets/fonts/OcrB/ocrb.ttf');
}
@davidparys
davidparys / composable.ts
Created March 1, 2025 18:18
Typed fetch for api routes in nuxt
// composables/useTypedFetch.ts
import type { UseFetchOptions } from 'nuxt/app'
import type { InternalApi } from 'nitropack'
import type { ApiRoutes, ApiResponse } from './apiResponse'
export const useTypedFetch = <T extends ApiRoutes, M extends keyof InternalApi[T]>(
route: T,
method: M,
opts?: Omit<UseFetchOptions<ApiResponse<T, M>>, 'method'>
) => {
<script setup lang="ts">
const {
coursesEn,
coursesDe,
isLoading,
learndashEn
} = useLearndashCache()
// Example of using SWR pattern for a specific course
const useCourse = async (id: string) => {