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
/* | |
Example for quick Java compilation and unit tests in VS Code. | |
Works well with simple BlueJ projects. | |
Hit Ctrl+Shift+B to compile currently open file with javac. | |
Hit Ctrl+Shift+T to test currently open test class. | |
See red wiggles for compilation errors / failed assertions or click exclamation mark in the status bar. | |
Uses a few workarounds for individual commands per task and filename without extension. | |
This is written for Windows but it should be easy to adopt for Linux and Mac. | |
*/ | |
{ |
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
/* | |
An example tasks.json for VS Code that defines a task for compiling Latex to PDF including a problem matcher. | |
This is for Windows but it should be easy to adopt it for Linux/Mac, basically replace powershell with sh and -Command with -c | |
*/ | |
{ | |
"version": "0.1.0", | |
"isShellCommand": true, | |
"suppressTaskName": true, | |
"windows": { | |
"command": "powershell", |
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
Debugger listening on port 14905 | |
waiting for debug protocol on port 4711 | |
>> accepted connection from client | |
-> initializeRequest | |
{ type: 'request', | |
seq: 1, | |
command: 'initialize', | |
arguments: { adapterID: 'php', linesStartAt1: true, pathFormat: 'path' } } |
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
{ | |
"version": 3, | |
"sources": [ | |
"node_modules/browser-pack/_prelude.js", | |
"node_modules/angular-animate/angular-animate.js", | |
"node_modules/angular-animate/index.js", | |
... | |
"node_modules/angular/angular.js", | |
"node_modules/angular/index.js", | |
"node_modules/javascript-natural-sort/naturalSort.js", |
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
# Fix UTF8 Output | |
# [Console]::OutputEncoding = [Text.Encoding]::UTF8 | |
$OutputEncoding = [Text.Encoding]::UTF8 | |
$env:COMPOSER_DISABLE_XDEBUG_WARN = 1 | |
$env:NPM_CONFIG_UNICOE = 'true' | |
# A helper function to switch between multiple versions of PHP, NodeJS, ... | |
function Use-Version($program, $version, $arch) { |
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. | |
*/ |
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 { 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
// 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
#!/usr/bin/env pwsh | |
$ErrorActionPreference = 'Stop' | |
$repositoryRoot = $PWD | |
# Builds the PCRE extension to sqlite3. | |
function Build-Libsqlite3Pcre { | |
[OutputType([string])] | |
param() |
OlderNewer