Skip to content

Instantly share code, notes, and snippets.

View optiguy's full-sized avatar
⚛️

Bjarke B Holm-Rubeksen optiguy

⚛️
  • Karnov Group
  • Denmark
View GitHub Profile
### Keybase proof
I hereby claim:
* I am optiguy on github.
* I am optiguy (https://keybase.io/optiguy) on keybase.
* I have a public key ASD1IBtirYY03rJHm32Hyq_t-4vQ1g4ITn5XspH2E7csDQo
To claim this, I am signing this object:
@optiguy
optiguy / productOfArrayExceptSelf
Created March 15, 2023 16:45
Product Of Array Except Self
var test = require('tape');
/**
* EXERCISE
*
* Given an array of integers,
* return a new array such that each element at index i of the new array is the product of all the numbers in the original array,
* except the one at i.
*
* Examples:
* 1) If our input was [3, 2, 1], the expected output would be [2, 3, 6].
@optiguy
optiguy / History|-100c6602|entries.json
Last active December 20, 2022 13:05
VS Code configuration and extensions.
{"version":1,"resource":"file:///Users/u0158083/Projects/kui/packages/kui-docs/node_modules/%40karnov/kui-react/src/components/Modal/ModalWithHeroImage.tsx","entries":[{"id":"Osj1.tsx","timestamp":1669378436538},{"id":"3yMB.tsx","source":"Workspace Edit","timestamp":1669378443799},{"id":"RH8R.tsx","source":"undoRedo.source","timestamp":1669378485238}]}
@optiguy
optiguy / videoPlaybackQualityWatcher
Created October 6, 2017 11:46
proposed solution for videoPlaybackQualityWatcher on shakaPlayer
function(
totalFrames, droppedFrames,
videoWidth, videoHeight,
bandwidth,
frameRate) {
var totalPixels = videoWidth * videoHeight;
var displayedFramesRatio = (totalFrames - droppedFrames) / totalFrames;
var totalPixelsPerSecond = frameRate * totalPixels;
var displayedPixelsPerSecond = displayedFramesRatio * totalPixelsPerSecond;