Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Selikoff samselikoff

View GitHub Profile
@samselikoff
samselikoff / components.my-component\.js
Last active Aug 2, 2020
Component helper bug with Glimmer components
View components.my-component\.js
import Component from '@glimmer/component';
export default class extends Component {
}
View machine.js
const inspectorMachine = Machine(
{
id: "inspector",
context: {
iframeRef: null,
error: null,
errorHandlingRequest: null,
db: {},
},
View sample-mirage-custom-hook-test.js
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 Nov 23, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-05-01T19:06:41.818Z","extensionVersion":"v3.4.3"}
@samselikoff
samselikoff / cloudSettings
Created Apr 10, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-04-10T16:25:30.624Z","extensionVersion":"v3.4.3"}
View mirage-graphql-example.js
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 Nov 23, 2019
React spring example
View example.js
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 Nov 20, 2019
mirage-graphql-example
View mirage-config.js
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!
View across-route-animation.diff
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";
View controllers.application.js
import Ember from 'ember';
import fade from 'ember-animated/transitions/fade';
export default Ember.Controller.extend({
fade
});
You can’t perform that action at this time.