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
// Modified version of this Stack Overflow response: | |
// https://stackoverflow.com/a/48459005/1950503 | |
// (Removes ramda dependency, adds .trim() to string replacer, adds it to Jest global var instead of exporting) | |
// To use: | |
// Put `<rootDir>/path/to/customWhitespaceMatcher.js` in your Jest config under setupFiles | |
// Call it in your tests like this: | |
// expect( | |
// customMatchers.whitespaceMatcher(receivedResult, expectedResult).pass | |
// ).toBeTruthy(); |
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
function useMedia(query) { | |
const [matches, setMatches] = useState(window.matchMedia(query).matches) | |
useEffect(() => { | |
const media = window.matchMedia(query) | |
if (media.matches !== matches) { | |
setMatches(media.matches) | |
} | |
const listener = () => { | |
setMatches(media.matches) |
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 time | |
print "..." | |
time.sleep(1) | |
print "..." | |
print "..." | |
print "..." | |
print "..." | |
time.sleep(1) | |
print "..." |
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
export HOMEBREW_INSTALL_BADGE="🧋" | |
# Bash/ZSH Stuff | |
alias reload='source ~/.zshrc' | |
alias a='echo "------------Your aliases------------";alias' | |
alias sa='source ~/.zshrc;echo "ZSH aliases sourced."' | |
alias bp='vim ~/.zshrc' | |
# Install git completion here: brew install git bash-completion | |
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion |
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
ABACI | |
ABACK | |
ABASE | |
ABASH | |
ABATE | |
ABBEY | |
ABBOT | |
ABEAM | |
ABEAR | |
ABETS |
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
/** | |
As seen on twitch.tv/cassidoo | |
*/ | |
// A function that validates an email address | |
function validateEmail(email) { | |
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Support Black Orgs</title> | |
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css" /> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css" |
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 React, { useState, useEffect, useReducer, useMemo } from 'react' | |
import ReactDOM from 'react-dom' | |
// let text = 'hellllooooo' | |
// I AM REACT | |
// let domTable = {} | |
// let element = Counter // state = 0 | |
// commit(element, domTable) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Ha ha, Business!</title> | |
<link rel="stylesheet" href="main.css" /> | |
</head> | |
<body> | |
<h1>I am an incredibly fancy business woman</h1> |
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
/* | |
IMPORTANT: Change the fonts on lines 31-35 to make this work the way you want! | |
*/ | |
:root { | |
--dark0: #2e3440; | |
--dark1: #3b4252; | |
--dark2: #434c5e; |