Skip to content

Instantly share code, notes, and snippets.

View Zeko369's full-sized avatar
:octocat:
Building cool stuff

Fran Zekan Zeko369

:octocat:
Building cool stuff
  • Zagreb, Croatia
  • 11:02 (UTC +02:00)
  • X @Zeko369
View GitHub Profile
import prisma from "../dbClient.js";
import { getTasks } from "../ext-src/queries.js";
export default async function (args, context) {
return (getTasks as any)(args, {
...context,
entities: {
Task: prisma.task,
},

Conflicts:

db/schema.rb

Related Issue

Have a look at Ticket to see requirements

Type:

  • Bugfix
  • Feature
  • Refactoring
"use client";
import { useCallback, useRef } from "react";
import { css } from "../../../styled-system/css";
function useLongPress(
callback: (e: React.MouseEvent | React.TouchEvent) => void,
shortClick: () => void,
duration: number = 500
) {
console.log(
JSON.stringify(
Object.fromEntries(
[...document.querySelectorAll(".config-vars tr")]
.map((row) => [
row.querySelector(".config-var-key").value,
row.querySelector(".config-var-value").value,
])
.filter((item) => !!item[0] && !!item[1])
),
{
// "editor.lineNumbers": "relative",
"vim.insertModeKeyBindings": [{ "before": ["j", "k"], "after": ["<Esc>"] }],
"vim.visualModeKeyBindings": [
{ "before": ["B"], "after": ["^"] },
{ "before": ["E"], "after": ["$"] }
],
"vim.normalModeKeyBindings": [
{ "before": ["B"], "after": ["^"] },
{ "before": ["E"], "after": ["$"] },
/* Hide "Home" */
div[aria-label="Home timeline"] > :first-child > div > div:first-child {
display: none;
}
/* Hide "For you / Followoing" */
div[aria-label="Home timeline"] > :first-child > div > div:nth-child(2) {
display: none;
}
import sys
import dataclasses
@dataclasses.dataclass
class Reindeer:
name: str
speed: int
fly_time: int
rest_time: int
const fastify = require("fastify");
const server =
/** @type {import('fastify').FastifyInstance<any, IncomingMessage | Http2ServerRequest, ServerResponse<IncomingMessage> | Http2ServerResponse, FastifyBaseLogger, import('@fastify/type-provider-typebox').TypeBoxTypeProvider> } */ (
fastify().withTypeProvider()
);
let ReturnSchema = {
type: "object",
properties: {
const { Type } = require("@sinclair/typebox");
import fastify from "fastify";
const server =
/** @type {import('fastify').FastifyInstance<any, IncomingMessage | Http2ServerRequest, ServerResponse<IncomingMessage> | Http2ServerResponse, FastifyBaseLogger, import('@fastify/type-provider-typebox').TypeBoxTypeProvider> } */ (
fastify().withTypeProvider()
);
const ReturnSchema = Type.Object({
import { Prisma } from '@prisma/client';
const selectOnUser = {
id: true,
name: true,
} satisfies Prisma.UserSelect