Skip to content

Instantly share code, notes, and snippets.

View tyson-kubota's full-sized avatar

Tyson Kubota tyson-kubota

View GitHub Profile
const sleep = ms => { return new Promise(resolve => setTimeout(resolve, ms)) }
const injectButton = async () => {
// Similiarly, we also need to wait for the page to load in...
await sleep(1000);
console.log("hey");
const {url} = await fetch("https://bhchiang--get-url-get.modal.run/").then(r => r.json());
const URL = `${url}/get_prompt`;
@tomdaley92
tomdaley92 / README.md
Last active March 31, 2025 17:31
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

⚠️ Warning: this document is out of date.

For the most recent webpack5 instructions see MIGRATION.md.

Storybook experimental Webpack 5 support

Storybook 6.2 includes experimental Webpack 5 support. Webpack 5 brings a variety of performance improvements, as well as exciting new features like module federation. Here's a quick guide to get you going.

Intro

@andreidiaconu90
andreidiaconu90 / tl-dr-pipeline-template.txt
Created September 21, 2020 07:05
tl-dr-pipeline-template
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
BranchName:
Description: CodeCommit branch name
Type: String
Default: master
RepositoryName:
Description: CodeCommit repository name
Type: String
Default: my-codecommit-repository-name
@TheMagoo73
TheMagoo73 / config.yml
Created November 23, 2019 21:51
Example CircleCI for Node module
version: 2.1
jobs:
build:
docker:
- image: circleci/node:10.15
working_directory: ~/repo
steps:
@lukevandekieft
lukevandekieft / AppSyncApp.js
Last active August 18, 2023 18:43
Basic AppSync Subscription
import React, { Component } from 'react';
import { compose, graphql } from 'react-apollo';
import gql from 'graphql-tag';
import OnUpdateUser from './OnUpdateUser';
import GetUserQuery from './GetUser';
class Dashboard extends Component {
//Set up subscription to user info changes
@yagudaev
yagudaev / cypress_support_hooks.js
Last active September 16, 2021 08:46
Cypress Fetch Support Workaround - replaces fetch request with traditional XHR so cypress can track them
// cypress/support/hooks.js
// Cypress does not support listening to the fetch method
// Therefore, as a workaround we polyfill `fetch` with traditional XHR which
// are supported. See: https://github.com/cypress-io/cypress/issues/687
enableFetchWorkaround()
// private helpers
function enableFetchWorkaround() {
let polyfill
@JimmyCheng
JimmyCheng / vis_timeline_with_arror_first_test.html
Last active May 18, 2023 22:49 — forked from frboyer/vis_timeline_with_arror_first_test.html
This is test to see how difficult it would be to add multiple arrows to vis.js timeline view. Can be previewed with https://gistpreview.github.io/?b5a7a48e51d0b5d62aee718e10039e16
<!DOCTYPE html>
<html>
<head>
<title>Timeline | Group example, with an arrow</title>
<style>
body,
html {
font-family: arial, sans-serif;
font-size: 11pt;
@bvaughn
bvaughn / index.md
Last active February 25, 2025 15:56
Interaction tracing with React

This API was removed in React 17


Interaction tracing with React

React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".

With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.

@ZwaarContrast
ZwaarContrast / Dropzone.js
Last active May 2, 2023 20:31
Using cypress with react-dropzone to upload a file.
// your react component
import * as React from 'react'
import Dropzone from 'react-dropzone'
// apply your own styling and stuff, should probably also show the files when uploaded
const Upload = () => {
return (<Dropzone data-cy="drag-and-drop">Drag and Drop here</Dropzone>)
}
export default Upload