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
// Schema | |
import { relations } from 'drizzle-orm'; | |
import { serial, text, timestamp, pgTable, date, integer } from 'drizzle-orm/pg-core'; | |
export const habits = pgTable('habits', { | |
id: serial('id').primaryKey(), | |
name: text('name'), | |
days_per_month: integer('days_per_month'), | |
created_at: timestamp('created_at'), | |
updated_at: timestamp('updated_at') |
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
// Mockingvite = Vitest + Mockingoose aka Mongoose Mocking for Vitest | |
// A Vitest compatable version of Mockingoose | |
// Docs avaiable here https://github.com/alonronin/mockingoose | |
// Support my work by becoming a Level Up Pro - leveluptutorials.com | |
import { vi } from 'vitest' | |
import mongoose from 'mongoose' | |
if (!/^5/.test(mongoose.version)) { |
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
diff --git a/node_modules/mongoose/lib/index.js b/node_modules/mongoose/lib/index.js | |
index 1425cfa..631eba5 100644 | |
--- a/node_modules/mongoose/lib/index.js | |
+++ b/node_modules/mongoose/lib/index.js | |
@@ -732,19 +732,19 @@ Mongoose.prototype.connections; | |
* Driver dependent APIs | |
*/ | |
-const driver = global.MONGOOSE_DRIVER_PATH || './drivers/node-mongodb-native'; | |
+ |
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
This Freelance Contract (this “Contract” or this “Freelance Contract”), is entered into and made effective as of [date] (the “Effective Date”), by and between [customer] (“Customer”), and [freelancer] (“Freelancer”). | |
WHEREAS: | |
Customer has a need for [services] and | |
Freelancer has an interest in performing such services for Customer; and | |
The parties wish to set forth the terms and conditions upon which such services will be provided to Customer; | |
NOW THEREFORE, in consideration of the foregoing, and the mutual promises herein contained, the parties hereby agree as follows: | |
Terms and Conditions |
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 url("https://fonts.googleapis.com/css?family=Space+Mono:400|Work+Sans:400"); | |
:root { | |
/* Define Colors as colors */ | |
--green: #00ebc7; | |
--red: #ff5470; | |
--yellow: #fde24f; | |
--black: #1b2d45; | |
--darkBlue: #00214d; | |
--darkGrey: #222; |
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
const FakeComponent = () => { | |
return ( | |
<AnimatedRoutes exitBeforeEnter initial={false}> | |
<RouteTransition exact path="/some-route"> | |
<NewUsers /> | |
</RouteTransition> | |
<RouteTransition exact path="/yo" > | |
<Users /> | |
</RouteTransition> | |
</AnimatedRoutes> |
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
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
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
const pages = [ | |
'https://images.pexels.com/photos/62689/pexels-photo-62689.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', | |
'https://images.pexels.com/photos/296878/pexels-photo-296878.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', | |
'https://images.pexels.com/photos/1509428/pexels-photo-1509428.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', | |
'https://images.pexels.com/photos/351265/pexels-photo-351265.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260', | |
'https://images.pexels.com/photos/924675/pexels-photo-924675.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260' | |
] |
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 React from 'react' | |
const Waypoints = () => { | |
return ( | |
<div className="waypoints"> | |
<p> | |
Lorem ipsum dolor amet poutine pitchfork tattooed venmo, heirloom cliche chartreuse gentrify mumblecore hammock single-origin coffee banh mi. Sartorial unicorn 90's edison bulb iPhone. Leggings pickled brunch neutra tousled. Occupy fixie affogato pinterest vaporware aesthetic, tbh subway tile hammock next level prism vape lomo taiyaki kale chips. Jianbing knausgaard taxidermy squid artisan thundercats, gochujang subway tile air plant taiyaki master cleanse cray. | |
</p> | |
<p> | |
Pug godard pour-over 90's direct trade, PBR&B +1 next level organic edison bulb quinoa DIY. Taiyaki sriracha unicorn, cronut taxidermy chicharrones four dollar toast keytar cold-pressed raclette yuccie cray iceland. Roof party knausgaard neutra plaid, pork belly chambray banh mi chia. Blue bottle narwhal iceland health goth cornhole fam humblebrag flannel pitchfork pickled. |
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 { useRef, useState, useEffect } from 'react' | |
import ResizeObserver from 'resize-observer-polyfill' | |
export default function useMeasure() { | |
const ref = useRef() | |
const [bounds, set] = useState({ left: 0, top: 0, width: 0, height: 0 }) | |
const [ro] = useState(() => new ResizeObserver(([entry]) => set(entry.contentRect))) | |
useEffect(() => (ro.observe(ref.current), ro.disconnect), []) | |
return [{ ref }, bounds] | |
} |
NewerOlder