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.
Calculates the logarithm of the given number in the given base.
Sums all the numbers between
Changes the URL of the remote repository.
Creates a fixup commit that can be autosquashed in the next rebase.
Displays the difference between two branches.
Calculates the date of
n days from the given date.
num within the inclusive range specified by the boundary values.
Checks if the given number falls within the given range.
Checks if the provided integer is a prime number.
Pads a given number to the specified length.
Creates a directory, if it does not exist.
Checks if the given element is focused.
Checks if the browser tab of the page is focused.
Checks if the given argument is a symbol.
Loads a module after removing it from the cache (if exists).