30 seconds of code provides a curated collection of short code snippets for all your development needs. Our collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Adds a new submodule to the repository.
Configures git to autocorrect mistyped commands.
Creates and switches to a new branch, optionally setting up a remote tracking branch.
Deletes a submodule from the repository.
Discards all untracked changes to the current branch.
Rebases the current branch onto another branch.
Renames a local branch.
Switches to an existing branch.
Switches back to the last branch.
Prints the current status of the working tree.
Returns the length of a string in bytes.
Capitalizes the first letter of every word in a string.
Calculates the factorial of a number.
Generates a string with the given string value repeated
n number of times.
Checks if two numbers are approximately equal to each other.