Skip to content

Instantly share code, notes, and snippets.

View Ansh-Rathod's full-sized avatar
😎
Nerd today, Boss tomorrow!

Ansh rathod Ansh-Rathod

😎
Nerd today, Boss tomorrow!
  • 127.0.0.1
  • Ahemdabad, Gujarat
  • 00:57 (UTC +05:30)
  • X @anshrathodfr
View GitHub Profile
@slightfoot
slightfoot / humpday_2025-08-06_1.dart
Last active September 16, 2025 19:16
Stack Canvas - with Active Rebulding - Part 3 - by Simon Lightfoot :: #HumpdayQandA on 6th August 2025 :: https://www.youtube.com/watch?v=HV634FxxdPs
// MIT License
//
// Copyright (c) 2025 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:uri/uri.dart';
class PathRouteMatch {
PathRouteMatch(
{required this.parameters,
required this.route,
import 'dart:collection';
import 'dart:math';
import 'dart:ui' as ui;
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
// TODO
// * check if [radius] / [radii] are not too big?
// * use [Path.arcToPoint] so [radius] (and [radii]) can be specified as [Radius]
@Roaa94
Roaa94 / infinite_scrolling.dart
Last active September 25, 2023 15:47
Infinite Scrolling with Riverpod
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:dio/dio.dart';
// Disclaimer: This uses the "The Movie Database API (TMDB)"
// https://developers.themoviedb.org/3/getting-started
// With this endpoint:
// https://developers.themoviedb.org/3/people/get-popular-people
/// The FutureProvider that does the fetching of the paginated list of people
@PierBover
PierBover / index.md
Last active October 22, 2025 21:22
Reading waveform data in ffmpeg

Reading waveform data in ffmpeg

When working on an audio player, I wanted to extract the audio waveform data to paint the audio waveform dynamically in the browser on a <canvas> element.

Initially I used the bbc/audiowaveform package but this proved problematic for a number of reasons. First I wasn't able to install that package (or build the binary) in macOS for local dev. The other big issue is that I was only able to figure out how to install it on Ubuntu, so I couldn't use it in Alpine (for Docker images) or other environments like cloud functions.

Initial approach

I found out from these docs it's possible to paint a waveform with ffmpeg by extracting raw audio data: