To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
printf '\e[38;5;196mWARNING! This is a production server!\n' |
# Ensure current directory is the script directory | |
WORKDIR=`dirname "$0"` | |
cd ${WORKDIR} |
export default withPassThroughProps({ | |
whiteList: false, /* blacklist these props */ | |
propNames: [...brands, ...sizes], | |
})(SomeComponent); |
{ | |
error: { | |
message: "One or more fields appear to be incorrect", // this is the main error message to show users (e.g. at the top of the form) | |
developer_message: "This is a message for developers to help diagnose the problem", // optional | |
reasons: [ | |
{ | |
param: "email", | |
message: "Please enter a valid email address", | |
}, | |
{ |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
# Hide | |
defaults write com.apple.finder CreateDesktop false; killall Finder | |
# Show | |
defaults write com.apple.finder CreateDesktop true; killall Finder |
[{ | |
"title": "Like a Rolling Stone", | |
"artist": "Bob Dylan", | |
"album": "Highway 61 Revisited", | |
"released": "1965-08-30", | |
} | |
{ | |
"title": "(I Can't Get No) Satisfaction - Mono Version", | |
"artist": "The Rolling Stones", |
const dictionary = require("./words.json"); | |
class Wordle { | |
static DEFAULT_ALPHABET = Array.from({ length: 26 }, (_, i) => String.fromCharCode(i + 97)); | |
static DEFAULT_DICTIONARY = []; | |
static DEFAULT_SIZE = 5; | |
static calcLetterFrequency(words = []) { | |
return words.reduce((freqs, word) => { | |
for (const letter of word) { |
[ | |
"aahed", | |
"aalii", | |
"aargh", | |
"aarti", | |
"abaca", | |
"abaci", | |
"aback", | |
"abacs", | |
"abaft", |
import { useState, useMemo } from "react"; | |
// Usage example (booleans) | |
const userActivity = useStatus([true, false]); | |
userActivity.status; // true | |
userActivity.toggle(); | |
userActivity.setTrue(); | |
userActivity.setFalse(); | |
userActivity.reset(); |