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
async Task<double> ComputeStuffAsync(CancellationToken token) | |
{ | |
var tsk = Task.Run(() => | |
{ | |
var sum = 0.0; | |
int DOP = 4; | |
Parallel.For(0, DOP - 1, new ParallelOptions { MaxDegreeOfParallelism = DOP, CancellationToken = token }, | |
// Initialize the local states | |
() => (double)0.0, |
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
*PPD-Adobe: "4.3" | |
*%%%% PPD file for SCX-3200 with CUPS. | |
*%%%% Created by the CUPS PPD Compiler CUPS v1.5.0. | |
*FormatVersion: "4.3" | |
*FileVersion: "2.0.0" | |
*LanguageVersion: English | |
*LanguageEncoding: ISOLatin1 | |
*PCFileName: "scx3200.ppd" | |
*Product: "(SCX-3200)" | |
*Manufacturer: "Samsung" |
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
#run latest SDK alpine-3.12 image with dump capabilities | |
docker run -it --rm --cap-add=SYS_PTRACE mcr.microsoft.com/dotnet/core/sdk:3.1-alpine | |
#we'll be using git | |
apk add git | |
#some trivialities | |
alias ll='ls -lah --color' | |
cd /srv/ | |
#clone my repo with tests |
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
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | | |
Get-ItemProperty -name Version,Release -EA 0 | | |
Where { $_.PSChildName -match '^(?!S)\p{L}'} | | |
Select PSChildName, Version, Release |
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.prototype.callAsWorker = function (context, args) { | |
return new Promise((resolve, reject) => { | |
const code = ` | |
${context ? [...context].reduce((acc, cur) => acc + cur.toString() + '\n') : ''} | |
self.onmessage = async function (e) { | |
const result = await ( ${this.toString()}.call(null, e.data) ); | |
self.postMessage( result ); |
OlderNewer