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
| """Reproducer: per-process GPU virtual address space cap on ROCm/Windows. | |
| Three phases: | |
| 1. VMM control - reserve 96 GiB, fill it entirely with 32 MiB | |
| hipMemCreate+Map+SetAccess. Expected: succeeds. | |
| 2. VA-only - reserve 16 GiB windows in a loop until failure. | |
| Observed: stops at 240 GiB. | |
| 3. Combined - reserve 229.2 GiB, then map 32 MiB pages into the last | |
| window. Observed: hipErrorOutOfMemory once |
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
| #!/usr/bin/env bash | |
| # | |
| # Binding of Isaac Mod Merger v5 | |
| # – Portable, non‐destructive, interactive or headless | |
| # – Dry‐run, conflict resolution, dependency scan | |
| # – File‐list editing (-f), metadata/log/README, Lua syntax check + dump on failure | |
| # – Tracks conflicted mods and shows merge progress bar | |
| # | |
| set -euo pipefail | |
| IFS=$'\n\t' |
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 fs = require('fs') | |
| const path = require('path') | |
| const schema = 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json' | |
| const remappers = { | |
| 'somesecurethinglikeapasswordoranauthtoken': '{{VARIABLE}}' | |
| } | |
| const processHeaders = (headers = []) => { | |
| const authHeader = headers.find((h) => h.name.toLowerCase() === 'authorization') |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Find Records Matching ID</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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 printer = (a) => `[\n ${a.map((o) => `{ ${Object.entries(o).map(([k, v]) => { | |
| return `${k}: ${typeof v === 'string' ? `'${v}'` : v}` | |
| }).join(', ')} }`).join(',\n ')}\n]` |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>Prefix Comparison</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
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
| let srcAry = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
| let splitBy = 3 | |
| let split = [] | |
| srcAry.forEach((val, i) => { | |
| let ary = i % splitBy ? split[split.length - 1] : (split[split.length] = []) | |
| ary.push(val) | |
| }) | |
| console.log(split) |
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 fs = require('fs') | |
| const crypto = require('crypto') | |
| const getHashAndSize = (file, alg = 'sha1') => new Promise((resolve, reject) => { | |
| let size = 0 | |
| const hasher = crypto.createHash(alg, { encoding: 'hex' }) | |
| const filestream = fs.createReadStream(file) | |
| filestream.pipe(hasher) | |
| filestream.on('data', (d) => { size += d.length }) |
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
| 'use strict' | |
| const repo = require('simple-git')(__dirname) | |
| const rgx = /this|that/i | |
| const start = (new Date('2014-12-29 00:00:00 -0500')).valueOf() | |
| const sinceStart = (c) => (new Date(c.date)).valueOf() > start | |
| const fileMap = {} | |
| repo.log([], async (err, d) => { | |
| const commits = d.all.filter((c) => c.message.match(rgx) && sinceStart(c)) |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>String.match(/x/i) vs toLowerCase() + indexOf()</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
| <script src="./suite.js"></script> | |
| </head> | |
| <body> | |
| <h1>Open the console to view the results</h1> |
NewerOlder