Skip to content

Instantly share code, notes, and snippets.

View cayblood's full-sized avatar

Carl Youngblood cayblood

View GitHub Profile
// app/services/auth.server.ts
import { parse } from "cookie";
import { verify } from "jsonwebtoken";
import { findOrCreateUser } from "~/models/user.server";
import { createUserSession, logout } from "~/services/session.server";
import type { HankoAuthInfo } from "~/routes/login";
import { JwksClient } from "jwks-rsa";
export const extractHankoCookie = (request: Request) => {
cayblood / index.tsx
Created March 17, 2023 03:50
remix-forms problem
import React from "react";
import { type ActionFunction, json, type LoaderFunction } from "@remix-run/node";
import { requireUser } from "~/session.server";
import { getUserStatus, syncStripeCustomer } from "~/models/user.server";
import { useLoaderData } from "@remix-run/react";
import Gravatar from "~/components/Gravatar";
import { makeDomainFunction } from "domain-functions";
import { register } from "~/join.server";
import Form from "~/ui/form";
import { z } from "zod";
FROM node:18-bullseye-slim
WORKDIR /myapp
# set for base and all layer that inherit from it
ENV NODE_ENV development
ENV DATABASE_URL file:./data.db?connection_limit=1
# Install openssl for Prisma

H1 Title

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce sodales ligula sed urna. Aliquam posuere arcu viverra erat. Pellentesque et enim dapibus ante facilisis bibendum. Nam congue dapibus urna. Vestibulum consequat arcu at magna. Nunc faucibus mollis lacus. Nulla tempor luctus tellus. Donec blandit lobortis pede. Vestibulum vel pede ut urna eleifend lacinia. Maecenas ligula nibh, imperdiet at, interdum eget, sagittis eu, enim. Vivamus vel urna. Donec fringilla ullamcorper sem. In risus arcu, pellentesque cursus, faucibus cursus, consequat quis, est. Aliquam id erat. Aliquam arcu. Phasellus vulputate. Integer sem diam, mattis vel, viverra ullamcorper, ultricies quis, nisl. Sed sollicitudin quam ut nisi. Vivamus velit sapien, volutpat eu, faucibus id, nonummy id, urna.

cayblood /
Last active June 5, 2022 04:11
Automates operation of our solar blinds using hubitat and MakerAPI
import os
import time as mytime
from pprint import pprint
from pyowm import OWM
from pyhubitat import MakerAPI
import astropy.units as u
from astropy.time import Time
from datetime import datetime
cayblood / requirements.txt
Last active October 27, 2020 01:23
Example of how to sign an API Gateway request using Signature Version 4 IAM-based authentication
# Specify the desired volume size in GiB as a command-line argument. If not specified, default to 20 GiB.
# Get the ID of the environment host Amazon EC2 instance.
# Get the ID of the Amazon EBS volume associated with the instance.
VOLUMEID=$(aws ec2 describe-instances \
// The code in this source file is licensed under the Creative Commons
// Attribution 4.0 International Public License. License text can be found at
// It may be shared and
// used freely for any purpose, as long as author attribution is included with
// the source code.
// written by Sophia Brandt
∴ sudo jamf recon
Retrieving inventory preferences from
Finding extension attributes...
Locating applications...
Locating hard drive information...
Locating accounts...
Locating printers...
Searching path: /System/Applications
Searching path: /Applications
cayblood / basic-chaincode.js
Created March 19, 2020 16:21
Basic chaincode example
'use strict';
const shim = require('fabric-shim');
let Chaincode = class {
async Init(stub) {'============= Init called =============');
return shim.success();
async Invoke(stub) {