Results for “tar”
Small, practical examples. Search by task or narrow things down below.
Read serial text up to a delimiter
Arduino / C: readBytesUntil excludes the delimiter and does not add a null terminator.
Arduino / C✓ Tested
Read stash labels without commit hashes
Git: A custom format provides predictable stash subjects.
Git✓ Tested
Read the current branch name
Git: show-current returns an empty string when HEAD is detached.
Git✓ Tested
Read the exact version currently staged
Git: The colon path syntax reads a blob from the index rather than from HEAD or the working file.
Git✓ Tested
Read the final array item with a negative index
TypeScript: at supports negative positions counted from the end.
TypeScript✓ Tested
Read the upstream tracked by the current branch
Git: The upstream shorthand resolves the configured remote-tracking branch.
Git✓ Tested
Recover from an expected promise rejection
TypeScript: Return a fallback from catch so later handlers receive an ordinary resolved value.
TypeScript✓ Tested
Refuse to overwrite an existing file with redirection
Bash Scripts: Noclobber makes a plain greater-than redirection fail when the target already exists.
Bash Scripts✓ Tested
Reject an integer with trailing characters
Arduino / C: strtol exposes an end pointer so a parser can require the entire token.
Arduino / C✓ Tested
Reject an unsupported settings version
Arduino / C: A version byte lets firmware fall back when stored settings use another format.
Arduino / C✓ Tested
Reject insertion when a fixed queue is full
Arduino / C: Track a count separately from circular read and write positions.
Arduino / C✓ Tested
Reject one outlier with a median-of-three filter
Arduino / C: Sorting three values leaves the median in the middle.
Arduino / C✓ Tested