WETZEL_WARNING: Unrecognized JSON Schema.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove all settings in the .npmrc except the required auth token setting. | |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc | |
# Create a new .yarnrc that specifies the npm registry, or append to an existing one. | |
echo 'registry: https://registry.npmjs.org/' >> .yarnrc | |
# Remove and regenerate the yarn.lock. This should be identical to running `yarn upgrade`. | |
# If you are uncomfortable regenerating the yarn.lock file, you can comment out the next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from 'react'; | |
// returns the state of *all* features for current user | |
const fetchAllFeatures = () => | |
// in reality, this would have been a `fetch` call: | |
// `fetch("/api/features/all")` | |
// Executes once | |
// console.log('fetch called'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f .huskyrc.js | |
cat > .simple-git-hooks.js << EOF | |
const { simpleGitHooks } = require('@stitch-fix/kufak-fe-infra'); | |
module.exports = simpleGitHooks; | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"anyOf": [ | |
{ | |
"$ref": "#/definitions/{name:\"order\"|\"categories\"|\"exchange\"|\"freestyle\"|\"homefeed\"|\"post_checkout_promo\"|\"return\"|\"shopping_bag\"|\"storybook\";schema:\"screen_view\";locale:\"en-GB\"|\"en-US\";region:\"UK\"|\"US\";source_app:\"android\"|\"storybook\"|\"home-ui\"|\"kept-items-ui\"|\"shop-collections-ui\";}" | |
}, | |
{ | |
"$ref": "#/definitions/{name:\"buy_it_again_index\"|\"category\"|\"collections_index\"|\"kept_items_index\"|\"saved_items_index\";schema:\"category_screen_view\";locale:\"en-GB\"|\"en-US\";region:\"UK\"|\"US\";source_app:\"android\"|\"storybook\"|\"home-ui\"|\"kept-items-ui\"|\"shop-collections-ui\";category_id:string;}" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# Collector for v2 "atomic" events. This is currently a bare-minimum implementation | |
# for v2 event steel-threads. These events should not yet be used for any production | |
# data processing. | |
class Api::V2::EventsCollectorController < Api::ApiController | |
# Client-auth data is being used to add client-id to our event payloads | |
include StitchFix::ClientFacingAuth::ControllerHelpers | |
include StitchFix::Logger::Logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
################### | |
# SHARED COMMANDS # | |
################### | |
cache_key: &cache_key dependency-cache-{{ checksum "yarn.lock" }} | |
# Docker build environment images | |
build_env: &build_env | |
image: cimg/node:current-browsers |
Hi! Thanks for using this project. I had a lot of fun building it, and I hope you're having fun using it too.
- Read the error message and documentation.
- Search existing issues, closed issues, and the internet first.
- If the issue is with a dependency of this project, post on the dependency's repo.
- If you can fix the issue, submit a PR 👍 💃 💃 🚀.
- If the issue persists, post on the issue tracker. Include any information that could help others reproduce and fix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Takes two strings. | |
// Returns true if they're anagrams, false if not. | |
function isAnagram (a, b) { | |
const remove = (string, pattern) => string.replace(new RegExp(pattern, 'ig'), ''); | |
// Discard whitespace; anagrams can be different numbers of words | |
let lettersA = remove(a, '\\s'); | |
let lettersB = remove(b, '\\s'); |
NewerOlder