Skip to content

Instantly share code, notes, and snippets.

View samselikoff's full-sized avatar

Sam Selikoff samselikoff

View GitHub Profile
@samselikoff
samselikoff / tailwind.config.js
Created April 16, 2021 15:57
Firefox plugin for Tailwind CSS. Add styles that target Firefox browser only.
const plugin = require("tailwindcss/plugin");
module.exports = {
mode: "jit",
purge: {
content: ["./src/**/*.{js,ts,jsx,tsx,mdx,vue}"],
},
theme: { extend: {} },
variants: {},
plugins: [
@samselikoff
samselikoff / components.my-component\.js
Last active August 2, 2020 06:00
Component helper bug with Glimmer components
import Component from '@glimmer/component';
export default class extends Component {
}
@samselikoff
samselikoff / machine.js
Last active May 19, 2020 14:13
Generated by XState Viz: https://xstate.js.org/viz
const inspectorMachine = Machine(
{
id: "inspector",
context: {
iframeRef: null,
error: null,
errorHandlingRequest: null,
db: {},
},
import { useSearch } from "use-cloudinary";
import { Server, Response } from "miragejs";
import { render, screen } from "@testing-library/react";
function App() {
const [search, data, status] = useSearch({ endpoint: "/example-endpoint" });
if (status === "loading") return <p data-test-id="loading">Loading...</p>;
if (status === "error") return <p data-test-id="error">Error</p>;
@samselikoff
samselikoff / cloudSettings
Last active January 10, 2024 21:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-05-01T19:06:41.818Z","extensionVersion":"v3.4.3"}
@samselikoff
samselikoff / cloudSettings
Created April 10, 2020 16:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-10T16:25:30.624Z","extensionVersion":"v3.4.3"}
import { buildSchema, graphql } from "graphql";
// Construct a schema, using GraphQL schema language
let graphqlSchema = buildSchema(`
type Query {
recipes: [Recipe]
recipes_by_pk(id: Int!): Recipe
}
type Recipe {
id: ID!
@samselikoff
samselikoff / example.js
Created November 23, 2019 05:04
React spring example
import React from "react";
import ReactDOM from "react-dom";
import "@reach/dialog/styles.css";
import { animated, useTransition, useChain } from "react-spring";
import { DialogOverlay, DialogContent } from "@reach/dialog";
const AnimatedDialogOverlay = animated(DialogOverlay);
function App() {
const [isOpen, setIsOpen] = React.useState(false);
@samselikoff
samselikoff / mirage-config.js
Created November 20, 2019 18:00
mirage-graphql-example
import { buildSchema, graphql } from "graphql";
// Construct a schema, using GraphQL schema language
let graphqlSchema = buildSchema(`
type Query {
recipes: [Recipe]
recipes_by_pk(id: Int!): Recipe
}
type Recipe {
id: ID!
diff --git a/app/pods/components/animate/component.js b/app/pods/components/animate/component.js
new file mode 100644
index 00000000..c959f943
--- /dev/null
+++ b/app/pods/components/animate/component.js
@@ -0,0 +1,21 @@
+import Component from "@ember/component";
+import { fadeIn } from "ember-animated/motions/opacity";
+import { wait } from "ember-animated";
+import { easeExpOut } from "d3-ease";