- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
- Ultimate Code Generator - https://webcode.tools/
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 errors from "errors"; | |
// Models | |
import { User, Episode } from "models"; | |
export async function getEpisodeForUser({ | |
episodeId, | |
userId, | |
}: GetEpisodeForUserArgs) { | |
try { |
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
// Flatten an array of arbitrarily nested arrays of values into a flat array of values. e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
const flattenArray = (arr) => { | |
// check if it's an array... if so flatten recursivly | |
if (Array.isArray(arr)) { | |
return arr.reduce( | |
function squish(acc, val) { | |
if (Array.isArray(val)) { | |
return acc.concat(val.reduce(squish, [])) | |
} else { |
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
select customers.CustomerName, customers.Country, orders.OrderId, orders.OrderDate | |
from orders inner join customers on orders.CustomerId = customers.CustomerId | |
select orders.OrderId, orders.OrderDate, employees.FirstName, employees.LastName | |
from orders | |
inner join employees on orders.employeeId = employees.employeeId | |