Skip to content

Commit

Permalink
Update TIL listing
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 29, 2024
1 parent 85d2173 commit 6f3e0af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This is a collection of short notes of the things I have learned on a daily basis while working on different technologies. I share these notes as I [learn in public](https://www.learninpublic.org/).

_**114** TILs and counting..._
_**115** TILs and counting..._

- 2024-12-29: [Dart Supports Underscore Digit Separators](https://github.com/petermekhaeil/til/blob/master/./learnings/dart-digit-separators.md)
- 2024-12-25: [Replace a Git Repository with a New One](https://github.com/petermekhaeil/til/blob/master/./learnings/git-replace-repo-content.md)
- 2024-01-28: [Send analytics data using the Beacon API](https://github.com/petermekhaeil/til/blob/master/./learnings/js-beacon-api.md)
- 2024-01-03: [TypeScript: ElementRef for React.useRef](https://github.com/petermekhaeil/til/blob/master/./learnings/ts-react-elementref.md)
Expand Down
6 changes: 6 additions & 0 deletions feed.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"content": "# Dart Supports Underscore Digit Separators\n\nIn Dart (starting from version 3.6.0), you can use underscores (`_`) as digit separators in number literals to make them more readable. This is especially handy for large numbers or when grouping digits for higher-level clarity.\n\nHere are some examples:\n\n```dart\nvar n1 = 1_000_000;\nvar n2 = 0.000_000_000_01;\nvar n3 = 0x00_14_22_01_23_45; // MAC address\nvar n4 = 65_1234_5678; // SG Phone number\nvar n5 = 100__000_000__000_000; // one hundred million million!\n```\n\nThis feature makes it easier to read long numeric values and organize digits meaningfully.\n\nDart isn’t alone in supporting this - other languages like JavaScript, Java, Python, and Kotlin also allow underscore digit separators. It's a great example of a feature that crosses language boundaries to make code cleaner and more human-readable.",
"date": "2024-12-29",
"path": "dart-digit-separators.md",
"title": "Dart Supports Underscore Digit Separators"
},
{
"content": "# Replace a Git Repository with a New One\n\nSometimes you need to reset a remote Git repository while keeping your local history intact. Here's how:\n\n**1. Add the Remote:**\n```bash\ngit remote add origin <remote-url>\n```\n\nLinks your local repo to the remote.\n\n**2. Force Push to Overwrite Remote History:**\n```bash\ngit push --force --set-upstream origin main\n```\n\nReplaces the remote history with your local history.",
"date": "2024-12-25",
Expand Down

0 comments on commit 6f3e0af

Please sign in to comment.