Skip to content

Instantly share code, notes, and snippets.

View timothymiller's full-sized avatar
🎄

Timothy Miller timothymiller

🎄
View GitHub Profile
@timothymiller
timothymiller / graphql.ts
Created May 11, 2023 21:41
Garph (tRPC-like) + Yoga GraphQL Server for Next.js
import { g, InferResolvers, buildSchema } from 'garph'
import { createYoga } from 'graphql-yoga'
const queryType = g.type('Query', {
greet: g
.string()
.args({
name: g.string().optional().default('Max'),
})
.description('Greets a person'),
@timothymiller
timothymiller / useQueryState.ts
Created September 12, 2022 14:20 — forked from SebastianHGonzalez/useQueryState.ts
useQueryState - query string synchronized use state hook for next.js
import { useState, useEffect } from "react";
import { useRouter } from "next/router";
type IParam = string;
type IValue = string | string[] | number | number[] | null | undefined;
type IState = { [k: string]: IValue };
type IQuery = IState;
type IRoute = string;
function isEmpty(value: IValue): boolean {
@timothymiller
timothymiller / cloudSettings
Last active March 1, 2021 21:44
VS Code settings
{"lastUpload":"2021-03-01T21:44:16.835Z","extensionVersion":"v3.4.3"}
@timothymiller
timothymiller / seafile-css-theme.css
Created June 9, 2020 03:11
Dark Mode for Seafile Community Edition (Place inside Custom CSS setting input box)
@media (prefers-color-scheme: dark) {
:root {
--main-bg: #000000;
--dark-bg: #000000;
--light-bg: #000000;
--main-font: #FFFFFF;
--light-font: #FFFFFF;
@timothymiller
timothymiller / pi-hole.conf
Created December 6, 2019 16:18
Unbound config with hardened security to support DNS over TLS 1.3 via Cloudflare & CleanBrowsing, DNS-SEC, and multi-threading.
server:
###########################################################################
# LOGGING
###########################################################################
# Do not print log lines to inform about local zone actions
log-local-actions: no
# Do not print one line per query to the log
log-queries: no
# Do not print one line per reply to the log
log-replies: no