Jakub Chodorowicz
Young/Skilled
@chodorowicz
github.com/chodorowicz
/** Copyright 2019,2020,2021,2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ | |
// node_modules/lambda-runtime/dist/node16/index.mjs | |
import { createRequire } from "module"; | |
var require2 = createRequire(import.meta.url); | |
var __getOwnPropNames = Object.getOwnPropertyNames; | |
var __require = /* @__PURE__ */ ((x) => typeof require2 !== "undefined" ? require2 : typeof Proxy !== "undefined" ? new Proxy(x, { | |
get: (a, b) => (typeof require2 !== "undefined" ? require2 : a)[b] | |
}) : x)(function(x) { | |
if (typeof require2 !== "undefined") | |
return require2.apply(this, arguments); |
/** | |
* # `<Image>` | |
* | |
* This component is a merge between `next/image` and `Chakra-ui`. | |
* - last updated on 2023-08-08 with `next/image` 13.4.13 and `chakra-ui/react` 2.8.0 | |
* - https://github.com/vercel/next.js/blob/v13.4.13/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/blob/canary/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/commits/canary/packages/next/src/client/image-component.tsx | |
* - https://github.com/vercel/next.js/compare/v13.4.4...canary | |
* |
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// when T is a tuple, Y is returned, otherwise N | |
// valid tuples = [string], [string, boolean], | |
// invalid tuples = [], string[], (string | number)[] |
/* @flow */ | |
import { Observable, Disposable, ReplaySubject } from 'rx'; | |
import mongo from 'mongodb'; | |
import { dbUrl } from './config'; | |
import { assign } from 'lodash'; | |
class QueryBuilder { | |
_db$: Observable; | |
_selectors: Object; |
The following will guide you through the process of enabling SSL on a Apache webserver
- The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
- The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"
Create a directory within /etc/apache2/
using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:
React now supports the use of ES6 classes as an alternative to React.createClass()
.
React's concept of Mixins, however, doesn't have a corollary when using ES6 classes. This left the community without an established pattern for code that both handles cross-cutting concerns and requires access to Component Life Cycle Methods.
In this gist, @sebmarkbage proposed an alternative pattern to React mixins: decorate components with a wrapping "higher order" component that handles whatever lifecycle methods it needs to and then invokes the wrapped component in its render()
method, passing through props
.
While a viable solution, this has a few drawbacks:
- There's no way for the child component to override functionality defined on the higher order component.
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream