Skip to content

Instantly share code, notes, and snippets.

View marvin-kolja's full-sized avatar
🛠️
Creating Stuff

Marvin Willms marvin-kolja

🛠️
Creating Stuff
  • Berlin, Germany
View GitHub Profile
@marvin-kolja
marvin-kolja / commit-count.sh
Created January 5, 2024 14:58
Commit Count
# This command counts the total number of commits in the current Git repository up to the current HEAD.
# The `HEAD` pointer can be substituted with a specific commit hash or branch name to count up to that point.
#
# Usage Example: This command is particularly useful in scenarios such as automatically incrementing
# the build number in iOS or Android app projects.
git rev-list --count HEAD
@marvin-kolja
marvin-kolja / periodic.dart
Last active October 4, 2023 08:43
Custom Dart Periodic - with duration multiplier, run limit, and immediate callback execution
import 'dart:async';
typedef PeriodicCallback = Future<Duration?> Function(
Periodic periodic,
);
/// The [Periodic] class is a wrapper around the [Timer] class that allows you
/// to run a timer periodically with a variable duration. It allows for a bit
/// more control over a periodic run.
///