Skip to content

Instantly share code, notes, and snippets.

View barrybtw's full-sized avatar
🏠
School stuff

Nicolai Christensen barrybtw

🏠
School stuff
  • Student in Scandinavia
  • Denmark
View GitHub Profile
@barrybtw
barrybtw / App.xaml
Created November 28, 2024 12:42
Investerings Guiden - Det bedste projekt af dem alle
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:InvesteringsGuiden"
x:Class="InvesteringsGuiden.App">
<Application.Resources>
<ResourceDictionary>
<local:AlternatingRowConverter x:Key="AlternatingRowConverter" />
</ResourceDictionary>
</Application.Resources>
</Application>
using System.Text.Json;
namespace Budgetering;
public class Income
{
public required string Name { get; set; }
public required decimal Amount { get; set; }
}
2024-08-02T17:45:10.703 app[48e2911b36d308] ams [info] null
2024-08-02T17:45:17.732 app[48e2911b36d308] ams [info] error {
2024-08-02T17:45:17.732 app[48e2911b36d308] ams [info] error: 'invalid_grant',
2024-08-02T17:45:17.732 app[48e2911b36d308] ams [info] error_description: 'Invalid "redirect_uri" in request.'
2024-08-02T17:45:17.732 app[48e2911b36d308] ams [info] }
__ __
/\ \__ /\ \ __ __
___ _ __ __ __ \ \ ,_\ __ \_\ \ _ __ /\_\ _____ _____ __ __ __ _____ /\_\
/'___\/\`'__\/'__`\ /'__`\ \ \ \/ /'__`\ _______ /'_` \/\`'__\/\ \/\ '__`\/\ '__`\/\ \/\ \ _______ /'__`\ /\ '__`\/\ \
/\ \__/\ \ \//\ __//\ \L\.\_\ \ \_/\ __//\______\/\ \L\ \ \ \/ \ \ \ \ \L\ \ \ \L\ \ \ \_\ \/\______\/\ \L\.\_\ \ \L\ \ \ \
\ \____\\ \_\\ \____\ \__/.\_\\ \__\ \____\/______/\ \___,_\ \_\ \ \_\ \ ,__/\ \ ,__/\/`____ \/______/\ \__/.\_\\ \ ,__/\ \_\
\/____/ \/_/ \/____/\/__/\/_/ \/__/\/____/ \/__,_ /\/_/ \/_/\ \ \/ \ \ \/ `/___/> \ \/__/\/_/ \ \ \/ \/_/
\ \_\ \ \_\ /\___/ \ \_\
'use client';
import * as z from 'zod';
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
import { useQuery } from '@tanstack/react-query';
import { useQueryClient } from '@tanstack/react-query';
import { z } from 'zod';
import { createZodFetcher } from 'zod-fetch';
const fetchWithZod = createZodFetcher();
const characterSchema = z.object({
info: z.object({
count: z.number(),
/*! modern-normalize v2.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
/*
Document
========
*/
/**
Use a better box model (opinionated).
*/
import { twMerge } from 'tailwind-merge';
import { useSidebarStore } from './sidebar-store';
function App() {
const {
value,
close,
open,
toggle: _toggle,
} = useSidebarStore((store) => store);
@barrybtw
barrybtw / drizzle-adapter.ts
Last active February 20, 2024 23:45
Drizzle adapter
export function DrizzleAdapter(): Adapter {
const { users, sessions, accounts, verificationTokens } = schema;
return {
createUser: async (data) => {
const id = crypto.randomUUID();
await db.insert(users).values({ ...data, id });
const user = await db
.select()
@import '@radix-ui/colors/blackA.css';
@import '@radix-ui/colors/violet.css';
.SliderRoot {
position: relative;
display: flex;
align-items: center;
user-select: none;
touch-action: none;
width: 200px;