The minimal steps to integrate Pocketbase with Sveltekit SSR. Not striclty needed as Pocketbase can be used from the browser only. But useful in certain cases.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Signal<T> = ReturnType<typeof createSignal<T>> | |
export function createSignal<Value>(initialValue: Value): { | |
subscribe: (listener: (v: Value) => void) => () => void | |
val: Value | |
} { | |
let value = initialValue | |
const listeners: ((v: Value) => void)[] = [] | |
function subscribe(listener: (v: Value) => void) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
@component | |
Allows to create responsive containers with a fixed aspect ratio. | |
Uses container queries to determine the size of the container. | |
The contained element will be as large as possible while maintaining the aspect ratio. | |
@example | |
```tsx | |
<div class="outer h-[100svh] grid grid-rows-[auto_1fr_auto]"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
dist | |
coverage | |
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloServer, gql } from "apollo-server-micro" | |
import cookieSession from "cookie-session" | |
const ONE_HOUR = 60 * 60 * 1000 | |
const typeDefs = gql` | |
type Query { | |
hello: String! | |
} | |
` |
I hereby claim:
- I am danielres on github.
- I am danielres (https://keybase.io/danielres) on keybase.
- I have a public key ASA7WN7ywCsV8R3AKSdH014O0nX8-sWUv4VlO2YxGMWZMwo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Finds a process by regexp then terminates | |
# it, including all subprocesses | |
# usage: ./terminate <PROCESS_NAME_OR_PATTERN> | |
kill -TERM -- -$(pgrep -f "$1") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from: https://github.com/microsoft/TypeScript/issues/27425 | |
// This workaround should become deprecated by: https://github.com/microsoft/TypeScript/pull/29818 | |
import * as React from "react"; | |
Person.defaultProps = { telephone: "222-333-4444" }; | |
function Person({ name, telephone }: { name: string; telephone: string }) { | |
return ( | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleep 10 | |
curl --retry 8 --retry-connrefused -v localhost:1234 |