Skip to content

Instantly share code, notes, and snippets.

@kaareloun
kaareloun / utilities.types.ts
Last active July 31, 2023 06:55
Typescript utilities
import "@total-typescript/ts-reset";
export {}
// Makes all properties optional
export type DeepPartial<T> = T extends object
? {
[P in keyof T]?: DeepPartial<T[P]>
}
: T
@kaareloun
kaareloun / nova.types.ts
Last active June 7, 2023 06:56
Laravel Nova Typescript types
export enum NovaMenuSlug {
Header = 'header',
Footer = 'footer'
}
export type NovaMenu = {
id: number
name: string
slug: NovaMenuSlug
locale: string
@kaareloun
kaareloun / deploy.yml
Last active December 15, 2023 14:08
Deploy a node app to Google Cloud Run using Github Actions with github secrets as environment variables
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GCP_APP_NAME: my-app-name