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
| // eslint-disable-next-line node/no-unpublished-require | |
| const stylelint = require('stylelint'); | |
| const ruleName = 'css-vars'; | |
| const messages = stylelint.utils.ruleMessages(ruleName, { | |
| undefinedCssVar: variable => `Expected variable to be defined: ${variable}`, | |
| }); | |
| const regex = /--[\w-]+/g; | |
| const definedVars = new Set(); |
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
| function shit<T extends {}, K extends keyof T>(obj: T, key: K): T[K] { | |
| return obj[key]; | |
| } | |
| const x: {name: string; value: number} = { | |
| name: '420', | |
| value: 228, | |
| }; | |
| const y = shit(x, 'name'); // string |
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 kerberos from "kerberos"; | |
| import { NextFunction, Request, Response } from "express"; | |
| import config from "../../config"; | |
| import ldap from "../../utilities/ldap"; | |
| import { processRawUser } from "./ldapAuth"; | |
| import { AuthResponseError } from "../../utilities/errorModels"; | |
| import { RequestWithUser } from "interfaces"; | |
| import jwt from "jsonwebtoken"; | |
| import { getLogger } from "../../utilities/logger"; |
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
| initPatient$ = createEffect(() => | |
| this.actions$.pipe( | |
| ofType(ROUTER_NAVIGATION), | |
| filter( | |
| (action: RouterNavigationAction) => | |
| new URL( | |
| window.location.protocol + window.location.hostname + action.payload.routerState.url | |
| ).pathname === '/patients/search' | |
| ), |
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
| export async function promiseAllWithLimit<T>( | |
| promiseGenerators: Array<() => Promise<T>>, | |
| poolLimit: number | |
| ): Promise<T[]> { | |
| let currentIndex = poolLimit - 1; | |
| const total = promiseGenerators.length; | |
| const results: T[] = Array(total); | |
| const next = async (index: number): Promise<void> => { | |
| if (index >= total) { |
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 express = require("express"); | |
| const proxy = require("express-http-proxy"); | |
| const path = require("path"); | |
| const app = express(); | |
| const api = "localhost:8080"; | |
| app.all( | |
| "/api/*", | |
| proxy(api, { |
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
| $rootScope.mouseDown = (e) -> | |
| setTimeout -> | |
| b = e.button | |
| t = $(e.target)[0] | |
| if t.parentNode | |
| c = $(t.parentNode)[0].className | |
| i = 0 | |
| dd = c | |
| while i < 3 | |
| t = $(t.parentNode)[0] |