Skip to content

Instantly share code, notes, and snippets.

View VaguelySerious's full-sized avatar
🥝

Peter Wielander VaguelySerious

🥝
View GitHub Profile
@VaguelySerious
VaguelySerious / use-this-as-a-bookmark-address.js
Created December 16, 2020 21:59
Bookmarkable code to quickly dark-mode a website
javascript:(function(){var all = document.getElementsByTagName("*");for (var i=0, max=all.length; i < max; i++) {all[i].style.setProperty('color', 'white', 'important');all[i].style.setProperty('background-color', 'black', 'important');}})();
@VaguelySerious
VaguelySerious / addhash
Created July 2, 2020 16:46
Bash script to add a file's hash to it's own filename
#!/bin/bash
# Put this file in your /usr/local/bin directory and run "sudo chmod +x" on it.
# Use like so:
# addhash somefile.txt
# results in file being renamed to:
# somefile.9g2lap4.txt
for name in "$@"
do
type containerCount vmDistribution avgDlLat avgDlLatMiss avgDlLatHit cacheHitRatio p10 p50 p90 p99
No caching 69 0.31/0.35/0.34 113 113
No caching 72 0.32/0.35/0.33 82 82
Function scope 70 0.30/0.31/0.39 82 90 28 0.128 18 24 40 95
Function scope 59 0.27/0.38/0.34 73 82 24 0.146 17 22 33 64
Function scope 61 0.32/0.29/0.38 72 79 24 0.133 17 21 36 63
Machine scope 55 0.30/0.32/0.38 69 106 36 0.528 18 28 62 145
Machine scope 59 0.28/0.36/0.36 65 94 29 0.444 17 23 47 102
Global scope 64 0.31/0.34/0.35 64 102 33 0.551 19 27 52 103
Global scope 61 0.29/0.33/0.38 60 95 31 0.546 19 26 50 93
type containerCount vmUsageDistribution avgClientLat avgS3Lat avgClientLatNotCached avgClientLatCached cacheHitRatio avgCacheLat p90 p99
no-cache 72 0.32/0.35/0.33 2731 82 2731 0 0 0 0 0
tmp-cache 70 0.30/0.31/0.39 2704 90 2445 259 0.128 28 40 95
tmp-cache 59 0.27/0.38/0.34 2494 82 2273 221 0.146 24 33 64
tmp-cache 61 0.32/0.29/0.38 2915 79 2564 351 0.133 24 36 63
loc-cache 55 0.30/0.32/0.38 1652 106 752 900 0.528 36 62 145
loc-cache 59 0.28/0.36/0.36 2480 94 1441 1039 0.444 29 47 102
ext-cache 35 0.27/0.34/0.39 2342 95 1060 1283 0.551 28 41 85
ext-cache 64 0.31/0.34/0.35 2673 102 1176 1497 0.551 33 52 103
ext-cache 61 0.29/0.33/0.38 2733 95 1263 1470 0.546 31 50 93