Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// my brain decided to ask the question: yknow, i want you to think about the y combinator -- | |
// like, what is it. like what the fuck girl, cmon, you have a comp sci degree, you should know this, and understand it and shit | |
// and so i was like fiiiiiiiiiiiiiiine gosh, lets see if typescript can handle the typing, and play around with it | |
// so i looked up a javascript implementation, and played with the type defintion until it | |
// matched up and then i was like oh: thats what the type definition of the functions in it are. | |
// i get it now. that's pretty cool. the main interesting thing is a the inner function that takes itself | |
// and returns the function initially passed to the outer function. neato. |
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 http = require('http') | |
import https = require('https') | |
import url = require('url') | |
import {AxiosInstance, AxiosInterceptorManager} from 'axios' | |
import {HttpRequestOptions as HttpFollowRequestOptions, http as httpFollow, https as httpsFollow} from 'follow-redirects' | |
import now = require('performance-now') | |
import httpAdapter = require('axios/lib/adapters/http') | |
import InterceptorManager = require('axios/lib/core/InterceptorManager') |
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
export type WriteFn = (s: string) => void | |
export type TemplatePrintFn = (s: TemplateStringsArray, ...values: any[]) => void | |
export function print(write: WriteFn | null, mapOrOptions: ((value: any) => string) | util.InspectOptions): TemplatePrintFn | |
export function print(s: TemplateStringsArray, ...values: any[]): void | |
export function print(s: TemplateStringsArray | WriteFn | null, ...values: any[]): TemplatePrintFn | void { | |
if (!(typeof s === 'function' || s === null)) { | |
console.log(_print(inspect, s, values)) | |
return | |
} |
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 {DoneVerifyFunc} from 'passport-azure-ad' | |
function safe<TUser, A1>( | |
handler: (a1: A1) => PromiseLike<TUser> | |
): (a1: A1, done: DoneVerifyFunc<TUser>) => void | |
function safe<TUser, A1, A2>( | |
handler: (a1: A1, a2: A2) => PromiseLike<TUser> | |
): (a1: A1, a2: A2, done: DoneVerifyFunc<TUser>) => void | |
function safe<TUser, A1, A2, A3>( | |
handler: (a1: A1, a2: A2, a3: A3) => PromiseLike<TUser> |
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
type TemplateAtom<T = any> = () => never | |
function t<T>(): TemplateAtom<T> | |
function t(strings: TemplateStringsArray): () => string | |
function t<A1>(strings: TemplateStringsArray, a1: TemplateAtom<A1>): (a1: A1) => string | |
function t<A1, A2>(strings: TemplateStringsArray, a1: TemplateAtom<A1>, a2: TemplateAtom<A2>): (a1: A1, a2: A2) => string | |
function t<A1, A2, A3>(strings: TemplateStringsArray, | |
a1: TemplateAtom<A1>, a2: TemplateAtom<A2>, a3: TemplateAtom<A3> | |
): (a1: A1, a2: A2, a3: A3) => string | |
function t<A1, A2, A3, A4>(strings: TemplateStringsArray, |
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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="https://rawgit.com/forivall/6a65862b134ee73db9ed3169bd161efd/raw/426d4433a7d04bc167056f0b933dd1c008f1d222/hello.xsl"?> | |
<hello-world> <greeter>An XSLT Programmer</greeter> <greeting>Hello, World!</greeting></hello-world> |
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
const mask = (1<<6) - 1 | |
const crypto = require('crypto') | |
function randString(l) { | |
// let randomFills = 0 | |
// let moves = 0 | |
const b = Buffer.alloc(l * 2) | |
const bl = b.length | |
let ok = 0 |
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
'use strict'; | |
const path = require('path'); | |
const eslint = require('eslint'); | |
const globby = require('globby'); | |
const isEqual = require('lodash.isequal'); | |
const multimatch = require('multimatch'); | |
const arrify = require('arrify'); | |
const optionsManager = require('./lib/options-manager'); | |
const mergeReports = reports => { |
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
interface CustomPromisify<F> { | |
(...args): any | |
__promisify__: F | |
} | |
type PromiseAsBluebird<P> = P extends PromiseLike<infer T> ? B<T> : B<P> | |
type ChangeReturnTypeFromPromiseToBluebird6<F> = F extends | |
((a1: infer A1, a2: infer A2, a3: infer A3, a4: infer A4, a5: infer A5, a6: infer A6) => PromiseLike<infer R>) ? |