Skip to content

Instantly share code, notes, and snippets.

View jtomchak's full-sized avatar
🐋
Chippin' away at it

Jesse Tomchak jtomchak

🐋
Chippin' away at it
View GitHub Profile
import { render, fireEvent, waitFor } from 'test-utils';
import { MockedProvider } from '@apollo/client/testing';
import ChatInput, { ADD_MESSAGE } from './ChatInput';
let resultCalled = false;
const addMessage = {
date_created: new Date(),
user: 'testUser',
message: 'chat input test message',
index: 0,
import {
chakra,
forwardRef,
SystemStyleObject,
useStyles,
useTheme,
HTMLChakraProps,
} from '@chakra-ui/system';
import { Slide, SlideOptions } from '@chakra-ui/transition';
import { cx, __DEV__ } from '@chakra-ui/utils';
@jtomchak
jtomchak / Iframe.js
Created June 9, 2021 00:58
Getting event on Interaction with an Embedded iFrame
import React from 'react'
export function iFrame({props}){
const iframeRef = React.useRef(null);
useElementInteration({
elementRef: iframeRef,
onInteraction: () =>
console.log("Interaction of iframe!!!")
});
@jtomchak
jtomchak / index.json
Created December 1, 2020 19:23
Props for post/index.js
{
"posts": [
"{_id: \"1b53b6f1-e74c-43dc-835c-62daa58fa8e1\", _upda…}",
"{_id: \"a7760b4a-a419-4014-a6c0-5cb961c1b9ad\", _upda…}",
"{_id: \"e0ec33e3-d419-4585-9198-30673a719801\", _upda…}"
],
"categories": [
{
"_id": "376bfca7-be64-47e5-93e2-552b1aeb813a",
"tags": [
@jtomchak
jtomchak / wp-import.js
Last active November 3, 2020 04:02
Import XML feed as json to Sanity CMS
require("dotenv").config({ path: "./.env.development" }); //loaded from .env.development
const r2 = require("r2");
const slugify = require("slugify");
var wpArticles = require("./rss-feed.json");
/**
{
"create": {
"_id": "123",
"_type": "cms.article",
@jtomchak
jtomchak / content.md
Created August 17, 2020 17:45
Gist from Drafts

Vote by mail: Which states allow absentee voting - Washington Post

For voters in seven states, in-person voting remains the only option unless they can provide an approved reason not related to fear of the coronavirus. Traditional absentee excuses include military deployments or illness.

I don't care who you vote for, or what party you vote for when millions are unable to easily vote, we all lose.

@jtomchak
jtomchak / smittenWASM.md
Last active September 5, 2019 17:27
Favorite new front-end technology

What’s your favorite new front-end technology? Why is it your favorite? What does it do well, where it could be improved, and how to spread its reach?

Webassembly is an exciting technology that is advancing the web as a platform in new and interesting ways. If you're not familiar with webassembly, let's do a lighting intro and then dive into the ways we can leverage this fantastic feature. 
Webassembly, or wasm for short, let's us to deliver compiled code to the browser that is able to parse and execute leaps and bounds faster than our bundled JavaScript can. But don't worry, it's not going to replace JavaScript or great tooling like Webpack or Babel. It's going to supplement and help with the heavy lifting to make our web apps run at almost native speeds!
Great use cases for leveraging the power of wasm could be anything that is computationally heavy that you'd like to do in the browser. Things like gaming engines, image shaders or manipulation. You might be using wasm today and not even know. Popular 
A 2019-07-28T23:28:17Z Running migrations for postit
A 2019-07-28T23:28:17Z 2019/07/28 23:28:17 New connection for "post-it-243617:us-central1:postitdb-beta"
A 2019-07-28T23:28:17Z 2019/07/28 23:28:17 New connection for "post-it-243617:us-central1:postitdb-beta"
A 2019-07-28T23:28:18Z 23:28:18.294 [info] == Running 20190717045929 Postit.Repo.Migrations.CreatePosts.change/0 forward
A 2019-07-28T23:28:18Z 23:28:18.298 [info] create table posts
@jtomchak
jtomchak / History|-1009be85|entries.json
Last active November 29, 2022 23:58
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/jesse/Documents/code/tauri-sample-next/src/pages/index.tsx","entries":[{"id":"YlTY.tsx","timestamp":1661792381463}]}