- Use https://gist.github.com/Tom910/aba8e0f741639a014b83a3a0686cef80 for setting keyboard
- install https://github.com/bp2008/BetterClearTypeTuner and use contrast 2000 for improve text
- settings for monitor https://www.reddit.com/r/ultrawidemasterrace/comments/zoqegd/aw3423dwf_best_hdr_settings_windowsgames_thread/
- install https://www.asus.com/motherboards-components/motherboards/prime/prime-z790-p-wifi/helpdesk_download/?model2Name=PRIME-Z790-P-WIFI - Intel SerialIO, Intel Chipset Driver, Realtek Audio Driver
- Set up git + git bash + ssh - https://interworks.com/blog/2021/09/15/setting-up-ssh-agent-in-windows-for-passwordless-git-authentication/ - set up Service, use ssh-add
- install wsl + ubuntu
- install docker https://tjisblogging.blogspot.com/2022/05/install-docker-on-windows-11-with-wsl.html
cd C:\Users${username}\AppData\Local\Microsoft\PowerToys\Keyboard Manager
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
// https://pqina.nl/blog/compress-image-before-upload?ck_subscriber_id=887774617 | |
<input type="file" multiple class="my-image-field" /> | |
<script> | |
const compressImage = async (file, { quality = 1, type = file.type }) => { | |
// Get as image data | |
const imageBitmap = await createImageBitmap(file); | |
// Draw to canvas |
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
Score | |
avif - 0.9132000000000002 | |
webp - 0.8198000000000002 | |
higher better |
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
window.onerror = function(message, file, line, column, error) { | |
var errorToReport = { | |
type: error ? error.type : '', | |
message: message, | |
file: file, | |
line: line, | |
column: column, | |
stack: error ? error.stack : '', | |
userAgent: navigator.userAgent, | |
href: location.href |
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
var Benchmark = require('benchmark'); | |
var expect = require('expect'); | |
var suite = new Benchmark.Suite; | |
var test = []; | |
for (var s = 0; s < 1000000; s++) { | |
test.push(s); | |
} |
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
var Benchmark = require('benchmark'); | |
var expect = require('expect'); | |
var suite = new Benchmark.Suite; | |
var test = { | |
reasons: [], | |
chunks: [] | |
}; | |
for (var s = 0; s < 5000; s++) { |
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
/* | |
❯ node -v | |
v14.15.1 | |
❯ node Map-vs-native-cache.js | |
Testing caching | |
Map x 57.19 ops/sec ±1.83% (59 runs sampled) | |
Native x 50.16 ops/sec ±2.87% (63 runs sampled) | |
Fastest is Map | |
*/ |
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
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var testObject = {}; | |
for (var s = 0; s < 1000; s++) { | |
testObject[s] = Math.floor(Math.random() * 10000); | |
} | |
console.log('Testing iteration of 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
var Benchmark = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
var testArray = []; | |
for (var s = 0; s < 1000; s++) { | |
testArray.push(s * 2); | |
} | |
suite |
NewerOlder