Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Syntax.fm & Level Up Tutorials

Scott Tolinski stolinski

💭
Syntax.fm & Level Up Tutorials
View GitHub Profile
@stolinski
stolinski / mongoose+5.11.8.patch
Created Feb 2, 2021
Patch to fix mongoose for esbuild
View mongoose+5.11.8.patch
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';
+
View gist:455135717c9e146f83955533860d58b0
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
@stolinski
stolinski / style.css
Last active Aug 5, 2020
levelup-classless.css
View style.css
@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;
@stolinski
stolinski / Example.tsx
Last active Mar 31, 2021
Route Transitions with Framer Motion
View Example.tsx
const FakeComponent = () => {
return (
<AnimatedRoutes exitBeforeEnter initial={false}>
<RouteTransition exact path="/some-route">
<NewUsers />
</RouteTransition>
<RouteTransition exact path="/yo" >
<Users />
</RouteTransition>
</AnimatedRoutes>
View providerCompose.js
function ProviderComposer({ contexts, children }) {
return contexts.reduceRight(
(kids, parent) =>
React.cloneElement(parent, {
children: kids,
}),
children
);
}
@stolinski
stolinski / Images.js
Created Apr 19, 2019
Images Array For useSprings
View Images.js
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'
]
@stolinski
stolinski / Waypoints.js
Created Apr 18, 2019
Waypoints Component For Animating React
View Waypoints.js
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.
@stolinski
stolinski / useMeasure.js
Created Apr 18, 2019
useMeasure - taken from React Spring example
View useMeasure.js
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]
}
@stolinski
stolinski / Routes.js
Last active Feb 26, 2020
React Spring React Router Starter
View Routes.js
import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
const Routes = () => {
return (
<Router>
<ul className="router-nav">
<NavLink to="/">One</NavLink>
<NavLink to="/two">Two</NavLink>
<NavLink to="/three">Three</NavLink>
@stolinski
stolinski / Toggle.js
Created Feb 19, 2019
Refactor For Hooks Course
View Toggle.js
import React, { Component } from "react";
export default class Refactor extends Component {
state = {
isToggled: false
};
toggle = () => {
this.setState(state => {
return { isToggled: !state.isToggled };