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
// ==UserScript== | |
// @name Restore Cmd+F on GitHub Beta boards | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Felix Becker | |
// @match https://github.com/orgs/sourcegraph/projects/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name GitHub estimate sum | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://github.com/orgs/sourcegraph/projects/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== |
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
/* eslint-disable no-unused-expressions */ | |
/* eslint-disable @typescript-eslint/prefer-includes */ | |
import { | |
Project, | |
Diagnostic, | |
SyntaxKind, | |
Node, | |
StructureKind, | |
QuoteKind, |
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
#Requires -Modules PSGitHub, PSGSuite | |
function New-CodingExercise { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory)] | |
[string] $CandidateUsername, | |
[Parameter(Mandatory)] | |
[string] $CandidateName, |
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
#Requires -Module PSGitHub | |
#Requires -Module PowerGit | |
[CmdletBinding()] | |
param() | |
$items = Get-Content not-needed-packages.txt | Select-String -Pattern 'Typings already defined for ([^ ]+)' -Context 0,5 | |
$i = 0 | |
$items | ForEach-Object { |
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
#!/usr/bin/env pwsh | |
$ErrorActionPreference = 'Stop' | |
$repositoryRoot = $PWD | |
# Builds the PCRE extension to sqlite3. | |
function Build-Libsqlite3Pcre { | |
[OutputType([string])] | |
param() |
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
// To avoid Promise<Promise<T>> | |
type Promisify<T> = Promise<Unpromisify<T>>; | |
type Unpromisify<P> = P extends Promise<infer T> ? T : P; | |
/** | |
* Symbol that gets added to objects by `Comlink.proxy()`. | |
*/ | |
export const proxyValueSymbol = Symbol("comlinkProxyValue"); |
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 { Worker } from 'worker_threads' | |
export function work<P extends any[], R>(script: (...args: P) => R | PromiseLike<R>, ...args: P): Promise<R> { | |
return new Promise((resolve, reject) => { | |
const workerSource = ` | |
const { workerData, parentPort } = require('worker_threads'); | |
Promise.resolve((${script})(...workerData)) | |
.then(result => { | |
parentPort.postMessage({ type: 'success', result }) | |
}, error => { |
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
// tslint:disable:forin | |
export class ProtoMap<V> { | |
private _values: any; | |
public [Symbol.toStringTag]: 'ProtoMap' = 'ProtoMap' | |
constructor(init?: Iterable<[string, V]> | { [key: string]: V }) { | |
this._values = { __proto__: null } | |
if (init) { |
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 { Subject } from 'rxjs/Subject' | |
export interface Splice<T> { | |
/** | |
* The zero-based location in the array from which to start removing elements. | |
*/ | |
start: number | |
/** | |
* The number of elements to remove. | |
*/ |
NewerOlder