/**
* Frontend Mock Interview
* 1. Web APIs and technologies
* 2. Coding questions
* 3. Web application frameworks questions
*/
/**
* 1. Web APIs and technologies
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
| <form | |
| name="waitlist" | |
| data-netlify="true" | |
| netlify-honeypot="bot-field" | |
| className="bg-primary p-10 mt-4 rounded shadow-md" | |
| onSubmit={(e) => { | |
| fetch("/", { | |
| method: "POST", | |
| headers: { "Content-Type": "application/x-www-form-urlencoded" }, | |
| body: encode({ "form-name": "waitlist", email }), |
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
| (* | |
| Even though a [native solution][1] exists, it still suffers from a big flaw: it right-clicks the place you cursor is, not what you’re selecting. This addresses that limitation. | |
| You can install this as a [Finder Service, and later asign it a keyboard shortcut][2]. | |
| [1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os | |
| [2]: http://www.macosxautomation.com/services/learn/tut01/index.html | |
| *) |
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
| import { darken, parseToHsl, hsl, getLuminance } from "polished"; | |
| const addAliases = (arr: (string | number)[], aliases: string[]) => | |
| aliases.forEach((key, i) => | |
| Object.defineProperty(arr, key, { | |
| enumerable: false, | |
| get() { | |
| return this[i]; | |
| } | |
| }) | |
| ); |
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
| Empty file |
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 { json, send } = require('micro') | |
| module.exports = async (req, res) => { | |
| return send(res, 200, req.url) | |
| } |
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 createProxy = require('micro-proxy') | |
| const services = require('./services') | |
| const {port} = require('./config').server | |
| const server = createProxy(Object.values(services) | |
| .map(service => service[process.env.NODE_ENV])) | |
| server.listen(port, (err) => { | |
| if (err) throw err | |
| console.log(`> Ready on http://localhost:${port}`) |
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 async = require('async') | |
| const Github = require('github-api') | |
| const { GraphQLClient } = require('graphql-request') | |
| const { query, mutation } = require('../graphql') | |
| const config = require('../config') | |
| const { token, repo, owner } = config.github | |
| const issues = new Github({ token }).getIssues(`${owner}/${repo}`) | |
| const graphqlClient = new GraphQLClient('https://api.github.com/graphql', { | |
| headers: { Authorization: `bearer ${token}`, } |
NewerOlder