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
| # `adb` commands to call for capturing high-res videos on Oculus VR headsets | |
| # | |
| # Usage: | |
| # | |
| # curl https://gist.githubusercontent.com/cvan/54535a41db8a67d0370971f6e393675d/raw/c2183adf4bf0e85edc422a13599eba54e62ee473/video-setprop.sh > /tmp/oculusvr-video-setup.sh | |
| # chmod +x /tmp/oculusvr-video-setup.sh | |
| # ./tmp/oculusvr-video-setup.sh | |
| # | |
| # Source: modified from https://github.com/MozillaReality/FirefoxReality/wiki/Tips-for-recording-videos | |
| # |
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
| From command line: | |
| FOR /f "tokens=*" %i IN ('docker ps -aq') DO docker rm -f %i | |
| FOR /f "tokens=*" %i IN ('docker images --format "{{.ID}}"') DO docker rmi -f %i | |
| docker builder prune -a | |
| From batch file: | |
| FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm -f %%i | |
| FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi -f %%i | |
| docker builder prune -a |
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
| ./adb shell find "/mnt/sdcard/ModData/com.beatgames.beatsaber/Mods/SongLoader" -iname "info.dat" | foreach { $dir=$_.split("/")[-2]; ./adb pull $_ "c:/Temp/$dir.dat" } | |
| Get-ChildItem | foreach {$_.name.replace("custom_level_", "").replace(".dat", "")} | where { $_.length -eq 40 } | where {$res=(invoke-webrequest -uri "https://scoresaber.com/api/leaderboard/by-hash/$_/info?difficulty=9" -SkipHttpErrorCheck); $res.StatusCode -eq 200 -and ($res.Content -match '"ranked": true')} |
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 only tests that has .only or all of them if there's no .only | |
| grep --exclude-dir=node_modules -rl . -e 'test.only\|it.only\|describe.only' --null | tr '\n' ' ' | xargs -0 npx jest | grep . || npx jest | |
| clear && grep --exclude-dir=node_modules -rl . -e 'test.only\|it.only\|describe.only' --null | tr '\n' ' ' | xargs -0 npx jest --coverage=false |
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
| British Post Office scandal https://www.youtube.com/watch?v=hCdI3UfQ1L4 | |
| Therac-25 https://www.youtube.com/watch?v=Ap0orGCiou8 | |
| ethiopian airlines flight 645 https://www.youtube.com/watch?v=lpJjWzCbsAc |
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
| \[32;1mcypress:server:util:process_profiler[^│]*│[^│]*│\W*'TOTAL'\W*│[^│]*│[^│]*│[^│]*│[^│]*│\W*([\d\.]*)\W*│\W*([\d\.]*)\W*│\W*([\d\.]*).*$ |
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
| alias cmd='open -a Terminal "`pwd`"' | |
| npr() { npm run $@ } | |
| export PATH="/opt/homebrew/bin:$PATH" | |
| clear() { printf '\33c\e[3J' } | |
| export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" | |
| gitPruneBranches() { git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done } | |
| gitMergeMain() { git rev-parse --abbrev-ref HEAD | read currentBranch && git checkout main && git pull && git checkout $currentBranch && git merge main -m "merge | |
| main" } | |
| gitCheckoutUnderMain() { git add . && git stash && git checkout main && git stash pop && git checkout -b $1 } |
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
| declare global { | |
| namespace Cypress { | |
| interface Chainable<Subject> { | |
| /** | |
| * Custom command similar to cy.then() but with retry-ability | |
| * @example cy.get('@jsonString').transformValue(JSON.parse).should('deep.equal', expectedValue) | |
| * Note: If a .should() assertion is successful, the retry chain is stopped. | |
| * So eg. cy.get('@jsonString').should('exist').transformValue(JSON.parse) will not query the jsonString again once it exists. | |
| */ | |
| transformValue<T>(transformFn: (subject: Subject) => T): Chainable<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
| type ExtendSubtype<Type, Subtype, NewProps> = { | |
| [K in keyof Type]: Type[K] extends Subtype | |
| ? Type[K] & NewProps | |
| : Type[K] extends object | |
| ? ExtendSubtype<Type[K], Subtype, NewProps> | |
| : Type[K]; | |
| }; |
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 createPseudoObject() { | |
| return new Proxy(new Function(), { get() { return createPseudoObject() } }) | |
| } |