- React Hooks API Reference
- Using the Effect Hook [link]
This file contains hidden or 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
{"label":"coverage","message":"95%","schemaVersion":1,"color":"brightgreen","namedLogo":"typescript"} |
This file contains hidden or 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
function ghrv() { | |
PR_NUMBER_AND_REPO=` | |
gh search prs --state=open --review-requested=@me \ | |
--json author,authorAssociation,number,repository,title,updatedAt \ | |
--template '{{range .}}{{tablerow .number .repository.nameWithOwner .title .author.name .authorAssociation (timeago .updatedAt)}}{{end}}' \ | |
-- -author:"svc-secops" -author:"app/renovate" -author:"app/github-actions" -author:"app/dependabot" | | |
fzf --height 25% --reverse | | |
cut -d' ' -f1-6 | | |
sed 's/ */:/g' | | |
awk '{$1=$1;print}' |
This file contains hidden or 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
#!/usr/bin/env bash | |
#### | |
# Copyright (c) 2016-2021 | |
# Jakob Westhoff <[email protected]> | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# - Redistributions of source code must retain the above copyright notice, this |
This file contains hidden or 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
// TODO: make `pages` optional and measure the div when unspecified, this will | |
// allow more normal document flow and make it easier to do both mobile and | |
// desktop. | |
import { | |
createContext, | |
useCallback, | |
useContext, | |
useEffect, | |
useMemo, | |
useRef, |
This file contains hidden or 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
const paragraph = | |
'If you want to jumpstart the process of talking to us about this role, here’s a little challenge: write a program that outputs the largest unique set of characters that can be removed from this paragraph without letting its length drop below 50.'; | |
// First we'll take the set of unique characters | |
const uniqueCharacters = str => { | |
const chars = []; | |
str.split('').forEach(char => { | |
if (!chars.includes(char)) { | |
chars.push(char); |
This file contains hidden or 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
/** | |
* A Canvas2D + SVG Pen Plotter example of "Cubic Disarray" | |
* (a recreation of an artwork by Georg Nees in 1968-71). | |
* | |
* @author Stephane Tombeur (https://github.com/stombeur) | |
*/ | |
const canvasSketch = require("canvas-sketch"); | |
const { polylinesToSVG } = require("canvas-sketch-util/penplot"); | |
const pickRandom = require("canvas-sketch-util/random"); |
This file contains hidden or 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 | |
orbs: | |
cypress: cypress-io/cypress@1 | |
slack: circleci/[email protected] | |
workflows: | |
run_cypress: | |
triggers: | |
- schedule: | |
cron: "30 11 * * *" |
getByTestId
, or which query should I use?- query cheatsheet
- API reference for all queries
- regular old jest matchers: https://jestjs.io/docs/en/expect#expectvalue
This file contains hidden or 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
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
let board = [[' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' ']]; | |
let currentPlayer = 'x'; | |
const charMap = { | |
A: 0, |
NewerOlder