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.
JavaScript, Function
Creates a function that accepts up to one argument, ignoring any additional arguments.
Use the HTML autocomplete
attribute to create more secure and accessible password fields.
Git, Repository
Applies the latest stash.
Git, Repository
Applies a specific stash.
Git, Repository
Changes the URL of the remote repository.
Git, Repository
Initializes a new git repository, setting up all the configuration files needed by git.
Git, Repository
Deletes a specific stash.
Git, Repository
Deletes all stashes.
Git, Branch
Discards all uncommitted changes to the current branch.
Git, Repository
Fetches the latest changes from the remote.
Git, Repository
Configures the line endings for a repository.
Git, Branch
Restores a file deleted in a specific commit.
Git, Branch
Rewinds the current branch by a given number of commits.
Git, Branch
Rewinds the current branch by a given number of commits.
Git, Commit
Undoes a specified commit without rewriting history.