This gist is in response to a RedwoodJS Discord question from Andrew (HH):
How do I create a worker with many skills?
Andrew (HH)12/11/2020
export const createWorker = ({ input }) => {
return db.worker.create({
data: {
This gist is in response to a RedwoodJS Discord question from Andrew (HH):
How do I create a worker with many skills?
Andrew (HH)12/11/2020
export const createWorker = ({ input }) => {
return db.worker.create({
data: {
| /****************************************************************************** | |
| * Implementation of `Nonempty` validator which checks that the provided type | |
| * has at least one defined property, excluding `{}`. | |
| ******************************************************************************/ | |
| type Nonempty<T extends { [key: string]: any }> = { [P in keyof T]: T }[keyof T]; | |
| declare function wantsNonempty<T extends { [key: string]: any }>(x: Nonempty<T>): true; | |
| wantsNonempty({ x: 1 }); | |
| wantsNonempty({}); // error expected |
| import axios from 'axios'; | |
| import qs from 'qs'; | |
| export const getAuth = async () => { | |
| const clientId = process.env.REACT_APP_BASIC_CLIENT_ID; | |
| const clientSecret = process.env.REACT_APP_BASIC_CLIENT_SECRET; | |
| const headers = { | |
| headers: { | |
| Accept: 'application/json', |
It's over 9 years old (as of 2024-02-18), there are many better guides! You might like https://rust-unofficial.github.io/too-many-lists/
% Let's build a binary tree!
Let's build a binary tree of strings in Rust. To recap, each node in a binary tree:
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\