function ffsilent { ffmpeg -i "$1" -c copy -an "${1%.*}-nosound.${1#*.}" }
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
/** | |
* StringUtil.ts | |
* | |
* A collection of utility functions for string manipulation. | |
* | |
* Attribution: Custom implementations inspired by common JavaScript practices. | |
* | |
* ## Contents: | |
* - `trimWhitespace(str)`: Removes leading and trailing whitespace from a string. | |
* - `toCamelCase(str)`: Converts a string to camelCase. |
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
/** | |
* CryptoUtil.ts | |
* | |
* A collection of utility functions for cryptographic operations using Node.js's built-in crypto module. | |
* | |
* Attribution: Utilizes Node.js's native crypto module for cryptographic operations. | |
* | |
* ## Contents: | |
* - `sha256(message)`: Creates a SHA-256 hash of the input message. |
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
/** | |
* RandomUtil.ts | |
* | |
* A collection of utility functions for generating random data. | |
* | |
* Attribution: This file was inspired by various online resources and personal coding experience. | |
* | |
* ## Contents: | |
* - `getRandomInt(min, max)`: Generates a random integer within a specified range. | |
* - `getRandomFloat(min, max)`: Generates a random floating-point number within a specified range. |
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
/** | |
* XLSX Utilities | Abhinav Kulshreshtha | Unlicense | |
* | |
* A collection of utility functions for working with XLSX files in Node.js. These utilities facilitate common tasks such as converting row/column indices to cell addresses, extracting headers from sheets, and converting arrays of objects into worksheets. Feel free to use, modify, and distribute under the Unlicense. | |
* | |
* ## Contents: | |
* - `rowIndexColToCellAddress`: Converts row and column indices to an Excel cell address in A1 notation. | |
* - `cellAddressToIndices`: Convert Excel cell address (A1 Notation) to row and column indices | |
* - `getHeaders`: Extracts headers from the first row of an Excel sheet. | |
* - `objectsToArrayWorksheet`: Converts an array of objects into a worksheet. |
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
/** | |
* FileUtils Collection | Abhinav Kulshreshtha | Unlicense | |
* | |
* A collection of utility functions for file operations, including reading, writing, and checking file existence. | |
* These functions are designed to simplify common tasks in Node.js applications. Feel free to use, modify, and distribute | |
* under the Unlicense. | |
* | |
* ## Contents: | |
* - `fileExists`: Checks if a file exists and creates the directory if it doesn't. | |
* - `readJsonFromFile`: Reads JSON data from a file and returns it as a string. |
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
#!/bin/bash | |
# Ensure we're working on the latest version of the main branch | |
git switch main | |
git fetch | |
git pull | |
# Create a new branch | |
git switch -c vitest |
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
# | |
# @author Abhinav Kulshreshtha | |
# @license The Unlicensed | |
# | |
# If you get the error: "Running scripts is disabled on this system" when loading the Profile: | |
# From a PowerShell window opened As Administrator: | |
# > Set-ExecutionPolicy RemoteSigned | |
# Select "Y"1 | |
# https://tecadmin.net/powershell-running-scripts-is-disabled-system/ |
Taken from https://gist.github.com/lttlrck/9628955
Rename a branch both locally and on server.
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
git log --oneline -10 # Managable git log.
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
/** Taken from Andrew Burgess YT video */ | |
// https://www.youtube.com/watch?v=_1mQ_A7fq-g | |
function logged< | |
This, | |
Args extends any[], | |
Return, | |
Fn extends (this: This, ...args:Args) => Returns> | |
( | |
target: Fn, |
NewerOlder