Skip to content

Instantly share code, notes, and snippets.

@actuallyjamez
actuallyjamez / svelte-cookies.ts
Created March 22, 2025 15:37
Better Auth plugin to set cookies on server api requests
import type { BetterAuthPlugin } from "better-auth";
import { createAuthMiddleware } from "better-auth/api";
import { parseSetCookieHeader } from "better-auth/cookies";
export const svelteCookies = () => {
return {
id: "svelte-cookies",
hooks: {
after: [
{
@actuallyjamez
actuallyjamez / BackgroundImage.tsx
Created July 15, 2021 00:05
Simple gatsby image component
import React, { ReactNode } from "react";
import { GatsbyImage } from "gatsby-plugin-image";
interface BackgroundImageProps extends React.HTMLAttributes<HTMLDivElement> {
image: any;
children: ReactNode;
}
const BackgroundImage = ({ image, children, ...div }: BackgroundImageProps) => {
return (
@actuallyjamez
actuallyjamez / readme.md
Last active November 7, 2019 09:02
drheader readme

drHEADer

drHEADer license

Short description about drHEADer.

Table of Contents

#
# Date: 18/03/2019
# Module: Introduction to Programming.
# Description: This file is a script used to perform various calculations on the prices of a set of given items.
#
# Note: I've used docstrings for functions, but I wasn't sure how many comments to include in the main script. I
# think most of the code is self explanatory and I didn't want to restate the obvious as per the commenting guidelines.
#
@actuallyjamez
actuallyjamez / click_to_pan.py
Created January 20, 2019 00:15
Ableton live middle click to pan script
from pynput import mouse
from pynput.keyboard import Key
from pynput.keyboard import Controller as KeyControl
from pynput.mouse import Button
from pynput.mouse import Controller as MouseControl
keyboard = KeyControl()
mouse_control = MouseControl()
currently_pressed = False