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
#!/usr/bin/env sh | |
# This loads nvm | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
# Bypass if a merge is happening | |
function skipIfMerging() { | |
local isMerge="$(git rev-parse -q --verify MERGE_HEAD)" | |
# If isMerge is a hash, a merge is ongoing |
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
const callbacks = []; | |
const fpsInterval = 1000 / 60; | |
let time = performance.now(); | |
function requestAnimationFrameLoop() { | |
const now = performance.now(); | |
const delta = now - time; | |
if (delta >= fpsInterval) { | |
// Adjust next execution time in case this loop took longer to execute | |
time = now - (delta % fpsInterval); |
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
@ECHO OFF | |
IF "%~1"=="" GOTO Continue | |
IF "%~1"=="-h" GOTO Continue | |
IF "%~2"=="" GOTO No2ndParam | |
IF NOT EXIST %1 GOTO NoWinDir1 | |
IF NOT EXIST %2 GOTO NoWinDir2 | |
PUSHD %1 |