Solution | Pros | Cons |
---|---|---|
Plugins | - Allow extending apps with various functionalities - Widely adopted in many modern software ecosystems, enhancing versatility - Allows forming community that creates and maintains plugins - Non-programmers can use existing plugins that someone else created |
- Only allows for a limited form of malleability; plugins are more of an outer layer of customization - Usually can't modify core functionalities or deeply ingrained software behaviors - A plugin created for one platform usually can't be used on another, leading to platform lock-in - Can result in fragmented development, with popular features being redundantly developed for different environments |
Black-box Interface Extensions | - Allow for the modification of legacy software which doesn't have built-in plugin architectures- Can modify app interfaces without needing access to internal structure or source code, enabling adaptability |
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 IoRedis from 'ioredis'; | |
import { setupBlitz } from '@blitzjs/next'; | |
import { AuthServerPlugin, simpleRolesIsAuthorized, SessionModel, Session } from '@blitzjs/auth'; | |
const dbs: Record<string, IoRedis.Redis | undefined> = { | |
default: undefined, | |
auth: undefined | |
}; | |
export function getRedis(): IoRedis.Redis { |
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 {execSync} from 'child_process'; | |
const destinationRepo = "https://github.com/??/??.git" | |
const issues = execSync(`gh issue list --json url --jq '[.[].url] | join(",")'`).toString().trim() | |
for (const issue of issues.split(',')) { | |
execSync(`gh issue transfer ${issue} ${destinationRepo}`).toString() | |
} |
09.04.2021 — 8h
- Setup blitz project
- Add Github and Gmail auth
- Send emails with link to reset password
- Create an email template
- Setup CI for tests and builds
- Send confirmation email after creating an account with login and password
- Handle account confirmation on the frontend
- Update DB models to contain info about origin and confirmed account
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 | |
fk.name AS constraint_name, | |
sch1.name AS [table_schema], | |
tab1.name AS [table_name], | |
sch2.name AS [ref_table_schema], | |
tab2.name AS [ref_table], | |
( | |
SELECT | |
col1.name AS [column], | |
col2.name AS [referenced_column] |
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
module.exports = { | |
"schema": [ | |
{ | |
"https://<YOUR_GRAPHQL_SERVICE>/graphql": { | |
"headers": {} | |
} | |
} | |
], | |
"documents": [ | |
"./src/**/*.tsx", |
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 { NowResponse } from '@now/node'; | |
import { fold } from 'fp-ts/lib/Either'; | |
import * as t from 'io-ts'; | |
import { reporter } from 'io-ts-reporters'; | |
type GetRequestValidator< | |
QueryValidator extends t.Any, | |
ParamsValidator extends t.Any | |
> = t.TypeC<{ | |
query: QueryValidator; |
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 * as React from 'react'; | |
import { useState } from 'react'; | |
export const useTouch = (ref: React.RefObject<HTMLElement>, defaultState = false) => { | |
const [state, setState] = useState(false); | |
React.useEffect(() => { | |
const element = ref.current; | |
if (!element) { | |
return; |
NewerOlder